CoreFiles by mySites.guru
class-wp-rest-comment-meta-fields.php51 lines, 893 bytes, from wordpress-5.6.13.zip
Raw History Compare with 5.6.12
md5
ce5ac6be42d82c1f4a2954f081996378
sha1
606208533d6a4bd0bde9035b6cf82516d685e4ac
sha256
6479d4290f4791db3d33072a6023ecfa073f177fa4e35e1b2c73c299d4bd1171
<?php
/**
 * REST API: WP_REST_Comment_Meta_Fields class
 *
 * @package WordPress
 * @subpackage REST_API
 * @since 4.7.0
 */

/**
 * Core class to manage comment meta via the REST API.
 *
 * @since 4.7.0
 *
 * @see WP_REST_Meta_Fields
 */
class WP_REST_Comment_Meta_Fields extends WP_REST_Meta_Fields {

	/**
	 * Retrieves the object type for comment meta.
	 *
	 * @since 4.7.0
	 *
	 * @return string The meta type.
	 */
	protected function get_meta_type() {
		return 'comment';
	}

	/**
	 * Retrieves the object meta subtype.
	 *
	 * @since 4.9.8
	 *
	 * @return string 'comment' There are no subtypes.
	 */
	protected function get_meta_subtype() {
		return 'comment';
	}

	/**
	 * Retrieves the type for register_rest_field() in the context of comments.
	 *
	 * @since 4.7.0
	 *
	 * @return string The REST field type.
	 */
	public function get_rest_field_type() {
		return 'comment';
	}
}

The same content is in 324 releases, WordPress 4.9.8-beta2 to 5.7.21. See them all, or every version of this file.