[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/rest-api/fields/ -> class-wp-rest-comment-meta-fields.php (source)

   1  <?php
   2  /**
   3   * REST API: WP_REST_Comment_Meta_Fields class
   4   *
   5   * @package WordPress
   6   * @subpackage REST_API
   7   * @since 4.7.0
   8   */
   9  
  10  /**
  11   * Core class to manage comment meta via the REST API.
  12   *
  13   * @since 4.7.0
  14   *
  15   * @see WP_REST_Meta_Fields
  16   */
  17  class WP_REST_Comment_Meta_Fields extends WP_REST_Meta_Fields {
  18  
  19      /**
  20       * Retrieves the comment type for comment meta.
  21       *
  22       * @since 4.7.0
  23       *
  24       * @return string The meta type.
  25       */
  26  	protected function get_meta_type() {
  27          return 'comment';
  28      }
  29  
  30      /**
  31       * Retrieves the comment meta subtype.
  32       *
  33       * @since 4.9.8
  34       *
  35       * @return string 'comment' There are no subtypes.
  36       */
  37  	protected function get_meta_subtype() {
  38          return 'comment';
  39      }
  40  
  41      /**
  42       * Retrieves the type for register_rest_field() in the context of comments.
  43       *
  44       * @since 4.7.0
  45       *
  46       * @return string The REST field type.
  47       */
  48  	public function get_rest_field_type() {
  49          return 'comment';
  50      }
  51  }


Generated: Fri Nov 22 01:00:02 2024 Cross-referenced by PHPXref 0.7.1