CoreFiles by mySites.guru
class-wp-rest-comment-meta-fields.php40 lines, 702 bytes, from wordpress-4.9.zip
Raw History Compare with 4.8.34
md5
46040759d0a23baa732725bcf3ca0277
sha1
3890e43d83c38e92e7dae7501e0915874c1c3132
sha256
2029d9d2c927374319a131d4a81f4ac346b3de8499ab22e065677d29508178c5
<?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 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 25 releases, WordPress 4.9-beta1 to 4.9.8-beta1-43498. See them all, or every version of this file.