From 7086111ad4dd997e12a3220e1ee60c9b9bcf0bb8 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 7 Jan 2020 13:06:14 +0100 Subject: Added wordpress --- .../fields/class-wp-rest-post-meta-fields.php | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 srcs/wordpress/wp-includes/rest-api/fields/class-wp-rest-post-meta-fields.php (limited to 'srcs/wordpress/wp-includes/rest-api/fields/class-wp-rest-post-meta-fields.php') diff --git a/srcs/wordpress/wp-includes/rest-api/fields/class-wp-rest-post-meta-fields.php b/srcs/wordpress/wp-includes/rest-api/fields/class-wp-rest-post-meta-fields.php new file mode 100644 index 0000000..cddc50d --- /dev/null +++ b/srcs/wordpress/wp-includes/rest-api/fields/class-wp-rest-post-meta-fields.php @@ -0,0 +1,72 @@ +post_type = $post_type; + } + + /** + * Retrieves the object meta type. + * + * @since 4.7.0 + * + * @return string The meta type. + */ + protected function get_meta_type() { + return 'post'; + } + + /** + * Retrieves the object meta subtype. + * + * @since 4.9.8 + * + * @return string Subtype for the meta type, or empty string if no specific subtype. + */ + protected function get_meta_subtype() { + return $this->post_type; + } + + /** + * Retrieves the type for register_rest_field(). + * + * @since 4.7.0 + * + * @see register_rest_field() + * + * @return string The REST field type. + */ + public function get_rest_field_type() { + return $this->post_type; + } +} -- cgit