- Timestamp:
- 07/19/2018 06:48:52 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.9/src/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php
r41162 r43510 24 24 */ 25 25 abstract protected function get_meta_type(); 26 27 /** 28 * Retrieves the object meta subtype. 29 * 30 * @since 4.9.8 31 * 32 * @return string Subtype for the meta type, or empty string if no specific subtype. 33 */ 34 protected function get_meta_subtype() { 35 return ''; 36 } 26 37 27 38 /** … … 318 329 $registered = array(); 319 330 320 foreach ( get_registered_meta_keys( $this->get_meta_type() ) as $name => $args ) { 331 $meta_type = $this->get_meta_type(); 332 $meta_subtype = $this->get_meta_subtype(); 333 334 $meta_keys = get_registered_meta_keys( $meta_type ); 335 if ( ! empty( $meta_subtype ) ) { 336 $meta_keys = array_merge( $meta_keys, get_registered_meta_keys( $meta_type, $meta_subtype ) ); 337 } 338 339 foreach ( $meta_keys as $name => $args ) { 321 340 if ( empty( $args['show_in_rest'] ) ) { 322 341 continue;
Note: See TracChangeset
for help on using the changeset viewer.