Plugin Updates

This commit is contained in:
Tony Volpe
2024-04-02 20:23:21 +00:00
parent 96800520e8
commit 94170ec2c4
1514 changed files with 133309 additions and 105985 deletions

View File

@@ -40,14 +40,17 @@ class WP_REST_Post_Search_Handler extends WP_REST_Search_Handler {
}
/**
* Searches the object type content for a given search request.
* Searches posts for a given search request.
*
* @since 5.0.0
*
* @param WP_REST_Request $request Full REST request.
* @return array Associative array containing an `WP_REST_Search_Handler::RESULT_IDS` containing
* an array of found IDs and `WP_REST_Search_Handler::RESULT_TOTAL` containing the
* total count for the matching search results.
* @return array {
* Associative array containing found IDs and total count for the matching search results.
*
* @type int[] $ids Array containing the matching post IDs.
* @type int $total Total count for the matching search results.
* }
*/
public function search_items( WP_REST_Request $request ) {
@@ -78,7 +81,7 @@ class WP_REST_Post_Search_Handler extends WP_REST_Search_Handler {
}
/**
* Filters the query arguments for a REST API search request.
* Filters the query arguments for a REST API post search request.
*
* Enables adding extra arguments or setting defaults for a post search request.
*
@@ -102,13 +105,20 @@ class WP_REST_Post_Search_Handler extends WP_REST_Search_Handler {
}
/**
* Prepares the search result for a given ID.
* Prepares the search result for a given post ID.
*
* @since 5.0.0
*
* @param int $id Item ID.
* @param array $fields Fields to include for the item.
* @return array Associative array containing all fields for the item.
* @param int $id Post ID.
* @param array $fields Fields to include for the post.
* @return array {
* Associative array containing fields for the post based on the `$fields` parameter.
*
* @type int $id Optional. Post ID.
* @type string $title Optional. Post title.
* @type string $url Optional. Post permalink URL.
* @type string $type Optional. Post type.
* }
*/
public function prepare_item( $id, array $fields ) {
$post = get_post( $id );