Changeset 49955 for trunk/src/wp-includes/rest-api/class-wp-rest-server.php
- Timestamp:
- 01/10/2021 10:21:39 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/class-wp-rest-server.php
r49946 r49955 163 163 public function check_authentication() { 164 164 /** 165 * Filters REST authentication errors.165 * Filters REST API authentication errors. 166 166 * 167 167 * This is used to pass a WP_Error from an authentication method back to … … 311 311 312 312 /** 313 * Filters the list of response headers that are exposed to CORS requests.313 * Filters the list of response headers that are exposed to REST API CORS requests. 314 314 * 315 315 * @since 5.5.0 316 316 * 317 * @param string[] $expose_headers The list of headers to expose.317 * @param string[] $expose_headers The list of response headers to expose. 318 318 */ 319 319 $expose_headers = apply_filters( 'rest_exposed_cors_headers', $expose_headers ); … … 330 330 331 331 /** 332 * Filters the list of request headers that are allowed for CORS requests.332 * Filters the list of request headers that are allowed for REST API CORS requests. 333 333 * 334 334 * The allowed headers are passed to the browser to specify which … … 339 339 * @since 5.5.0 340 340 * 341 * @param string[] $allow_headers The list of headers to allow.341 * @param string[] $allow_headers The list of request headers to allow. 342 342 */ 343 343 $allow_headers = apply_filters( 'rest_allowed_cors_headers', $allow_headers ); … … 346 346 347 347 /** 348 * Send nocache headers on authenticated requests.348 * Filters whether to send nocache headers on a REST API request. 349 349 * 350 350 * @since 4.4.0 … … 385 385 386 386 /** 387 * Filters whether jsonp is enabled.387 * Filters whether JSONP is enabled for the REST API. 388 388 * 389 389 * @since 4.4.0 390 390 * 391 * @param bool $jsonp_enabled Whether jsonpis enabled. Default true.391 * @param bool $jsonp_enabled Whether JSONP is enabled. Default true. 392 392 */ 393 393 $jsonp_enabled = apply_filters( 'rest_jsonp_enabled', true ); … … 769 769 770 770 /** 771 * Filters the enveloped form of a response.771 * Filters the enveloped form of a REST API response. 772 772 * 773 773 * @since 4.4.0 774 774 * 775 * @param array $envelope Envelope data. 775 * @param array $envelope { 776 * Envelope data. 777 * 778 * @type array $body Response data. 779 * @type int $status The 3-digit HTTP status code. 780 * @type array $headers Map of header name to header value. 781 * } 776 782 * @param WP_REST_Response $response Original response data. 777 783 */ … … 858 864 859 865 /** 860 * Filters the array of available endpoints.866 * Filters the array of available REST API endpoints. 861 867 * 862 868 * @since 4.4.0 … … 958 964 public function dispatch( $request ) { 959 965 /** 960 * Filters the pre-calculated result of a REST dispatch request.966 * Filters the pre-calculated result of a REST API dispatch request. 961 967 * 962 968 * Allow hijacking the request before dispatching by returning a non-empty. The returned value … … 1117 1123 * @since 4.7.0 1118 1124 * 1119 * @param WP_REST_Response|WP_HTTP_Response|WP_Error|mixed $response Result to send to the client. Usually a WP_REST_Response or WP_Error. 1125 * @param WP_REST_Response|WP_HTTP_Response|WP_Error|mixed $response Result to send to the client. 1126 * Usually a WP_REST_Response or WP_Error. 1120 1127 * @param array $handler Route handler used for the request. 1121 1128 * @param WP_REST_Request $request Request used to generate the response. … … 1140 1147 if ( ! is_wp_error( $response ) ) { 1141 1148 /** 1142 * Filters the REST dispatch request result.1149 * Filters the REST API dispatch request result. 1143 1150 * 1144 1151 * Allow plugins to override dispatching the request. … … 1178 1185 * @since 4.7.0 1179 1186 * 1180 * @param WP_REST_Response|WP_HTTP_Response|WP_Error|mixed $response Result to send to the client. Usually a WP_REST_Response or WP_Error. 1187 * @param WP_REST_Response|WP_HTTP_Response|WP_Error|mixed $response Result to send to the client. 1188 * Usually a WP_REST_Response or WP_Error. 1181 1189 * @param array $handler Route handler used for the request. 1182 1190 * @param WP_REST_Request $request Request used to generate the response. … … 1324 1332 1325 1333 /** 1326 * Filters the namespace index data.1334 * Filters the REST API namespace index data. 1327 1335 * 1328 1336 * This typically is just the route data for the namespace, but you can … … 1357 1365 1358 1366 /** 1359 * Filters the REST endpoint data.1367 * Filters the REST API endpoint data. 1360 1368 * 1361 1369 * @since 4.4.0 … … 1367 1375 1368 1376 /** 1369 * Filters the publicly-visible data for routes.1377 * Filters the publicly-visible data for REST API routes. 1370 1378 * 1371 1379 * This data is exposed on indexes and can be used by clients or … … 1467 1475 protected function get_max_batch_size() { 1468 1476 /** 1469 * Filters the maximum number of requests that can be included in a batch.1477 * Filters the maximum number of REST API requests that can be included in a batch. 1470 1478 * 1471 1479 * @since 5.6.0
Note: See TracChangeset
for help on using the changeset viewer.