Changeset 49955
- Timestamp:
- 01/10/2021 10:21:39 PM (4 years ago)
- Location:
- trunk/src/wp-includes/rest-api
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/class-wp-rest-request.php
r49927 r49955 340 340 * Retrieves the parameter priority order. 341 341 * 342 * Used when checking parameters in get_param().342 * Used when checking parameters in WP_REST_Request::get_param(). 343 343 * 344 344 * @since 4.4.0 … … 372 372 373 373 /** 374 * Filters the parameter order.374 * Filters the parameter priority order for a REST API request. 375 375 * 376 * The order affects which parameters are checked when using get_param() and family.377 * This acts similarly to PHP's `request_order` setting.376 * The order affects which parameters are checked when using WP_REST_Request::get_param() 377 * and family. This acts similarly to PHP's `request_order` setting. 378 378 * 379 379 * @since 4.4.0 … … 1036 1036 1037 1037 /** 1038 * Filters the request generated from a URL.1038 * Filters the REST API request generated from a URL. 1039 1039 * 1040 1040 * @since 4.5.0 -
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 -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-block-directory-controller.php
r49929 r49955 314 314 315 315 /** 316 * Filters collection parameters for the block directory controller.316 * Filters REST API collection parameters for the block directory controller. 317 317 * 318 318 * @since 5.5.0 -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
r49610 r49955 450 450 451 451 /** 452 * Filters whether comments can be created without authentication.452 * Filters whether comments can be created via the REST API without authentication. 453 453 * 454 454 * Enables creating comments for anonymous users. … … 956 956 957 957 /** 958 * Filters whether a comment can be trashed .959 * 960 * Return false to disable Trash support for the post.958 * Filters whether a comment can be trashed via the REST API. 959 * 960 * Return false to disable trash support for the comment. 961 961 * 962 962 * @since 4.7.0 963 963 * 964 * @param bool $supports_trash Whether the post type supporttrashing.965 * @param WP_ Post $comment The comment object being considered for trashing support.964 * @param bool $supports_trash Whether the comment supports trashing. 965 * @param WP_Comment $comment The comment object being considered for trashing support. 966 966 */ 967 967 $supports_trash = apply_filters( 'rest_comment_trashable', ( EMPTY_TRASH_DAYS > 0 ), $comment ); … … 1352 1352 1353 1353 /** 1354 * Filters a comment a fter it is prepared forthe database.1354 * Filters a comment added via the REST API after it is prepared for insertion into the database. 1355 1355 * 1356 1356 * Allows modification of the comment right after it is prepared for the database. … … 1675 1675 1676 1676 /** 1677 * Filters collection parameters for the comments controller.1677 * Filters REST API collection parameters for the comments controller. 1678 1678 * 1679 1679 * This filter registers the collection parameter, but does not map the -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php
r49952 r49955 587 587 588 588 /** 589 * Filters the plugin data for aresponse.589 * Filters plugin data for a REST API response. 590 590 * 591 591 * @since 5.5.0 -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php
r47122 r49955 269 269 270 270 /** 271 * Filters a status returned from the REST API.271 * Filters a post status returned from the REST API. 272 272 * 273 273 * Allows modification of the status data right before it is returned. … … 276 276 * 277 277 * @param WP_REST_Response $response The response object. 278 * @param object $status The original status object.278 * @param object $status The original post status object. 279 279 * @param WP_REST_Request $request Request used to generate the response. 280 280 */ -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php
r48121 r49955 155 155 156 156 /** 157 * Filters whether to preempt a setting value update .157 * Filters whether to preempt a setting value update via the REST API. 158 158 * 159 159 * Allows hijacking the setting update logic and overriding the built-in behavior by -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php
r49925 r49955 581 581 582 582 /** 583 * Filters collection parameters for the themes controller.583 * Filters REST API collection parameters for the themes controller. 584 584 * 585 585 * @since 5.0.0 -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php
r49906 r49955 1560 1560 1561 1561 /** 1562 * Filters collection parameters for the users controller.1562 * Filters REST API collection parameters for the users controller. 1563 1563 * 1564 1564 * This filter registers the collection parameter, but does not map the -
trunk/src/wp-includes/rest-api/search/class-wp-rest-post-format-search-handler.php
r49132 r49955 47 47 48 48 /** 49 * Filters the query arguments for a search request.49 * Filters the query arguments for a REST API search request. 50 50 * 51 51 * Enables adding extra arguments or setting defaults for a post format search request. -
trunk/src/wp-includes/rest-api/search/class-wp-rest-post-search-handler.php
r48381 r49955 72 72 73 73 /** 74 * Filters the query arguments for a search request.74 * Filters the query arguments for a REST API search request. 75 75 * 76 76 * Enables adding extra arguments or setting defaults for a post search request. -
trunk/src/wp-includes/rest-api/search/class-wp-rest-term-search-handler.php
r49787 r49955 67 67 68 68 /** 69 * Filters the query arguments for a search request.69 * Filters the query arguments for a REST API search request. 70 70 * 71 71 * Enables adding extra arguments or setting defaults for a term search request.
Note: See TracChangeset
for help on using the changeset viewer.