CoreFiles by mySites.guru
class-wp-rest-user-meta-fields.php40 lines, 675 bytes, from wordpress-4.9-beta2.zip
Raw History Compare with 4.9-beta1
md5
f670d087a9b963c8df9f9a6cc24b170e
sha1
8f91a8121398a0fcdf279a9f4adfcaafea2a8e10
sha256
67dcd470b7ebabff287f3379303729f9113734aea2c4e2806e6ea345b52d1eea
<?php
/**
 * REST API: WP_REST_User_Meta_Fields class
 *
 * @package WordPress
 * @subpackage REST_API
 * @since 4.7.0
 */

/**
 * Core class used to manage meta values for users via the REST API.
 *
 * @since 4.7.0
 *
 * @see WP_REST_Meta_Fields
 */
class WP_REST_User_Meta_Fields extends WP_REST_Meta_Fields {

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

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

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.