Changeset 51278 for trunk/src/wp-includes/rest-api.php
- Timestamp:
- 06/30/2021 12:33:43 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api.php
r51021 r51278 119 119 * by object type. 120 120 * 121 * @param string|array $object_type Object(s) the field is being registered 122 * to,"post"|"term"|"comment" etc.121 * @param string|array $object_type Object(s) the field is being registered to, 122 * "post"|"term"|"comment" etc. 123 123 * @param string $attribute The attribute name. 124 124 * @param array $args { … … 136 136 */ 137 137 function register_rest_field( $object_type, $attribute, $args = array() ) { 138 global $wp_rest_additional_fields; 139 138 140 $defaults = array( 139 141 'get_callback' => null, … … 143 145 144 146 $args = wp_parse_args( $args, $defaults ); 145 146 global $wp_rest_additional_fields;147 147 148 148 $object_types = (array) $object_type;
Note: See TracChangeset
for help on using the changeset viewer.