Changeset 57312
- Timestamp:
- 01/19/2024 05:37:05 PM (7 months ago)
- Location:
- trunk
- Files:
-
- 1 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-query.php
r57195 r57312 1028 1028 1029 1029 if ( ! ( $this->is_singular || $this->is_archive || $this->is_search || $this->is_feed 1030 || ( defined( 'REST_REQUEST' ) && REST_REQUEST&& $this->is_main_query() )1030 || ( && $this->is_main_query() ) 1031 1031 || $this->is_trackback || $this->is_404 || $this->is_admin || $this->is_robots || $this->is_favicon ) ) { 1032 1032 $this->is_home = true; -
trunk/src/wp-includes/deprecated.php
r57196 r57312 5437 5437 5438 5438 // If in the editor, add webfonts defined in variations. 5439 if ( is_admin() || ( defined( 'REST_REQUEST' ) && REST_REQUEST) ) {5439 if ( is_admin() || ) ) { 5440 5440 $variations = WP_Theme_JSON_Resolver::get_style_variations(); 5441 5441 foreach ( $variations as $variation ) { -
trunk/src/wp-includes/functions.php
r57279 r57312 3719 3719 */ 3720 3720 $callback = apply_filters( 'wp_die_json_handler', '_json_wp_die_handler' ); 3721 } elseif ( defined( 'REST_REQUEST' ) && REST_REQUEST&& wp_is_jsonp_request() ) {3721 } elseif ( && wp_is_jsonp_request() ) { 3722 3722 /** 3723 3723 * Filters the callback for killing WordPress execution for JSONP REST requests. … … 4442 4442 */ 4443 4443 function wp_send_json( $response, $status_code = null, $flags = 0 ) { 4444 if ( defined( 'REST_REQUEST' ) && REST_REQUEST) {4444 if ( ) { 4445 4445 _doing_it_wrong( 4446 4446 __FUNCTION__, … … 4698 4698 } 4699 4699 4700 4701 �� 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4700 4717 4701 4718 /** -
trunk/src/wp-includes/load.php
r56804 r57312 599 599 } 600 600 601 602 603 604 601 605 if ( defined( 'XMLRPC_REQUEST' ) || defined( 'REST_REQUEST' ) || defined( 'MS_FILES_REQUEST' ) 602 606 || ( defined( 'WP_INSTALLING' ) && WP_INSTALLING ) -
trunk/src/wp-includes/rest-api.php
r56834 r57312 210 210 */ 211 211 function rest_api_default_filters() { 212 if ( defined( 'REST_REQUEST' ) && REST_REQUEST) {212 if ( ) { 213 213 // Deprecated reporting. 214 214 add_action( 'deprecated_function_run', 'rest_handle_deprecated_function', 10, 3 ); … … 3390 3390 return new WP_REST_Response( $data, $status ); 3391 3391 } 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 -
trunk/src/wp-includes/rest-api/class-wp-rest-server.php
r57147 r57312 87 87 */ 88 88 protected $embed_cache = array(); 89 90 91 92 93 94 95 96 89 97 90 98 /** … … 984 992 */ 985 993 public function dispatch( $request ) { 994 995 986 996 /** 987 997 * Filters the pre-calculated result of a REST API dispatch request. … … 1009 1019 } 1010 1020 1021 1011 1022 return $result; 1012 1023 } … … 1016 1027 1017 1028 if ( is_wp_error( $matched ) ) { 1018 return $this->error_to_response( $matched ); 1029 $response = $this->error_to_response( $matched ); 1030 array_pop( $this->dispatching_requests ); 1031 return $response; 1019 1032 } 1020 1033 … … 1041 1054 } 1042 1055 1043 return $this->respond_to_request( $request, $route, $handler, $error ); 1056 $response = $this->respond_to_request( $request, $route, $handler, $error ); 1057 array_pop( $this->dispatching_requests ); 1058 return $response; 1059 } 1060 1061 /** 1062 * Returns whether the REST server is currently dispatching / responding to a request. 1063 * 1064 * This may be a standalone REST API request, or an internal request dispatched from within a regular page load. 1065 * 1066 * @since 6.5.0 1067 * 1068 * @return bool Whether the REST server is currently handling a request. 1069 */ 1070 public function is_dispatching() { 1071 return (bool) $this->dispatching_requests; 1044 1072 } 1045 1073 -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
r56586 r57312 202 202 wp_after_insert_post( $attachment, false, null ); 203 203 204 if ( defined( 'REST_REQUEST' ) && REST_REQUEST) {204 if ( ) { 205 205 /* 206 206 * Set a custom header with the attachment_id. … … 631 631 } 632 632 633 if ( defined( 'REST_REQUEST' ) && REST_REQUEST) {633 if ( ) { 634 634 /* 635 635 * Set a custom header with the attachment_id. -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-url-details-controller.php
r53455 r57312 129 129 * @since 5.9.0 130 130 * 131 * @param WP_REST_R EQUEST$request Full details about the request.131 * @param WP_REST_R $request Full details about the request. 132 132 * @return WP_REST_Response|WP_Error The parsed details as a response object. WP_Error if there are errors. 133 133 */ -
trunk/src/wp-includes/script-loader.php
r57204 r57312 2587 2587 */ 2588 2588 function wp_should_load_separate_core_block_assets() { 2589 if ( is_admin() || is_feed() || ( defined( 'REST_REQUEST' ) && REST_REQUEST) ) {2589 if ( is_admin() || is_feed() || ) ) { 2590 2590 return false; 2591 2591 } -
trunk/src/wp-includes/user.php
r57226 r57312 334 334 } 335 335 336 336 337 $is_api_request = ( ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ) || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ); 337 338
Note: See TracChangeset
for help on using the changeset viewer.