Changeset 34949 for trunk/src/wp-includes/rest-api/rest-functions.php
- Timestamp:
- 10/08/2015 06:00:45 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/rest-functions.php
r34928 r34949 5 5 * @package WordPress 6 6 * @subpackage REST_API 7 * @since 4.4.0 7 8 */ 8 9 … … 11 12 * 12 13 * @since 4.4.0 14 * 15 * @global WP_REST_Server $wp_rest_server ResponseHandler instance (usually WP_REST_Server). 13 16 * 14 17 * @param string $namespace The first URL segment after core prefix. Should be unique to your package/plugin. … … 20 23 */ 21 24 function register_rest_route( $namespace, $route, $args = array(), $override = false ) { 22 23 25 /** @var WP_REST_Server $wp_rest_server */ 24 26 global $wp_rest_server; … … 68 70 * 69 71 * @param string|array $object_type Object(s) the field is being registered 70 * 72 * to, "post"|"term"|"comment" etc. 71 73 * @param string $attribute The attribute name. 72 74 * @param array $args { … … 79 81 * field value. Default is 'null', the value cannot be set or 80 82 * updated. 81 * @type string|array|null schemaOptional. The callback function used to create the schema for83 * @type string|array|null $schema Optional. The callback function used to create the schema for 82 84 * this field. Default is 'null', no schema entry will be returned. 83 85 * } 84 86 */ 85 87 function register_api_field( $object_type, $attribute, $args = array() ) { 86 87 88 $defaults = array( 88 89 'get_callback' => null, … … 154 155 * 155 156 * @since 4.4.0 157 * 158 * @global WP $wp Current WordPress environment instance. 159 * @global WP_REST_Server $wp_rest_server ResponseHandler instance (usually WP_REST_Server). 156 160 */ 157 161 function rest_api_loaded() { … … 163 167 * Whether this is a REST Request. 164 168 * 169 * @since 4.4.0 165 170 * @var bool 166 171 */ … … 287 292 * @since 4.4.0 288 293 * 289 * @global WP_REST_Server $wp_rest_server 294 * @global WP_REST_Server $wp_rest_server ResponseHandler instance (usually WP_REST_Server). 290 295 * 291 296 * @param WP_REST_Request|string $request Request. … … 448 453 */ 449 454 function rest_send_allow_header( $response, $server, $request ) { 450 451 455 $matched_route = $response->get_matched_route(); 452 456
Note: See TracChangeset
for help on using the changeset viewer.