Changeset 57643
- Timestamp:
- 02/16/2024 09:33:02 PM (15 months ago)
- Location:
- trunk/src/wp-includes/rest-api/search
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/search/class-wp-rest-post-format-search-handler.php
r49955 r57643 27 27 28 28 /** 29 * Searches the object type contentfor a given search request.29 * Searches the post formats for a given search request. 30 30 * 31 31 * @since 5.6.0 32 32 * 33 33 * @param WP_REST_Request $request Full REST request. 34 * @return array Associative array containing an `WP_REST_Search_Handler::RESULT_IDS` containing 35 * an array of found IDs and `WP_REST_Search_Handler::RESULT_TOTAL` containing the 36 * total count for the matching search results. 34 * @return array { 35 * Associative array containing found IDs and total count for the matching search results. 36 * 37 * @type string[] $ids Array containing slugs for the matching post formats. 38 * @type int $total Total count for the matching search results. 39 * } 37 40 */ 38 41 public function search_items( WP_REST_Request $request ) { … … 47 50 48 51 /** 49 * Filters the query arguments for a REST API search request.52 * Filters the query arguments for a REST API post format search request. 50 53 * 51 54 * Enables adding extra arguments or setting defaults for a post format search request. … … 85 88 86 89 /** 87 * Prepares the search result for a given ID.90 * Prepares the search result for a given post format. 88 91 * 89 92 * @since 5.6.0 … … 91 94 * @param string $id Item ID, the post format slug. 92 95 * @param array $fields Fields to include for the item. 93 * @return array Associative array containing all fields for the item. 96 * @return array { 97 * Associative array containing fields for the post format based on the `$fields` parameter. 98 * 99 * @type string $id Optional. Post format slug. 100 * @type string $title Optional. Post format name. 101 * @type string $url Optional. Post format permalink URL. 102 * @type string $type Optional. String 'post-format'. 103 *} 94 104 */ 95 105 public function prepare_item( $id, array $fields ) { -
trunk/src/wp-includes/rest-api/search/class-wp-rest-post-search-handler.php
r56547 r57643 41 41 42 42 /** 43 * Searches the object type contentfor a given search request.43 * Searches posts for a given search request. 44 44 * 45 45 * @since 5.0.0 46 46 * 47 47 * @param WP_REST_Request $request Full REST request. 48 * @return array Associative array containing an `WP_REST_Search_Handler::RESULT_IDS` containing 49 * an array of found IDs and `WP_REST_Search_Handler::RESULT_TOTAL` containing the 50 * total count for the matching search results. 48 * @return array { 49 * Associative array containing found IDs and total count for the matching search results. 50 * 51 * @type int[] $ids Array containing the matching post IDs. 52 * @type int $total Total count for the matching search results. 53 * } 51 54 */ 52 55 public function search_items( WP_REST_Request $request ) { … … 79 82 80 83 /** 81 * Filters the query arguments for a REST API search request.84 * Filters the query arguments for a REST API post search request. 82 85 * 83 86 * Enables adding extra arguments or setting defaults for a post search request. … … 103 106 104 107 /** 105 * Prepares the search result for a given ID. 106 * 107 * @since 5.0.0 108 * 109 * @param int $id Item ID. 110 * @param array $fields Fields to include for the item. 111 * @return array Associative array containing all fields for the item. 108 * Prepares the search result for a given post ID. 109 * 110 * @since 5.0.0 111 * 112 * @param int $id Post ID. 113 * @param array $fields Fields to include for the post. 114 * @return array { 115 * Associative array containing fields for the post based on the `$fields` parameter. 116 * 117 * @type int $id Optional. Post ID. 118 * @type string $title Optional. Post title. 119 * @type string $url Optional. Post permalink URL. 120 * @type string $type Optional. Post type. 121 * } 112 122 */ 113 123 public function prepare_item( $id, array $fields ) { -
trunk/src/wp-includes/rest-api/search/class-wp-rest-term-search-handler.php
r54123 r57643 37 37 38 38 /** 39 * Searches t he object type contentfor a given search request.39 * Searches terms for a given search request. 40 40 * 41 41 * @since 5.6.0 … … 45 45 * Associative array containing found IDs and total count for the matching search results. 46 46 * 47 * @type int[] $ids Found IDs.47 * @type int[] $ids Found term IDs. 48 48 * @type string|int|WP_Error $total Numeric string containing the number of terms in that 49 49 * taxonomy, 0 if there are no results, or WP_Error if … … 80 80 81 81 /** 82 * Filters the query arguments for a REST API search request.82 * Filters the query arguments for a REST API term search request. 83 83 * 84 84 * Enables adding extra arguments or setting defaults for a term search request. … … 111 111 112 112 /** 113 * Prepares the search result for a given ID.113 * Prepares the search result for a given term ID. 114 114 * 115 115 * @since 5.6.0 116 116 * 117 * @param int $id Item ID. 118 * @param array $fields Fields to include for the item. 119 * @return array Associative array containing all fields for the item. 117 * @param int $id Term ID. 118 * @param array $fields Fields to include for the term. 119 * @return array { 120 * Associative array containing fields for the term based on the `$fields` parameter. 121 * 122 * @type int $id Optional. Term ID. 123 * @type string $title Optional. Term name. 124 * @type string $url Optional. Term permalink URL. 125 * @type string $type Optional. Term taxonomy name. 126 * } 120 127 */ 121 128 public function prepare_item( $id, array $fields ) {
Note: See TracChangeset
for help on using the changeset viewer.