mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Docs: Correct and improve the documented types for various functions and hooks.
See #55646 git-svn-id: https://develop.svn.wordpress.org/trunk@53877 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -571,7 +571,7 @@ class WP_REST_Plugins_Controller extends WP_REST_Controller {
|
||||
*
|
||||
* @since 5.5.0
|
||||
*
|
||||
* @param mixed $item Unmarked up and untranslated plugin data from {@see get_plugin_data()}.
|
||||
* @param array $item Unmarked up and untranslated plugin data from {@see get_plugin_data()}.
|
||||
* @param WP_REST_Request $request Request object.
|
||||
* @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
|
||||
*/
|
||||
|
||||
@@ -41,9 +41,14 @@ class WP_REST_Term_Search_Handler extends WP_REST_Search_Handler {
|
||||
* @since 5.6.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 Found IDs.
|
||||
* @type string|int|WP_Error $total Numeric string containing the number of terms in that
|
||||
* taxonomy, 0 if there are no results, or WP_Error if
|
||||
* the requested taxonomy does not exist.
|
||||
* }
|
||||
*/
|
||||
public function search_items( WP_REST_Request $request ) {
|
||||
$taxonomies = $request[ WP_REST_Search_Controller::PROP_SUBTYPE ];
|
||||
@@ -132,7 +137,7 @@ class WP_REST_Term_Search_Handler extends WP_REST_Search_Handler {
|
||||
* @since 5.6.0
|
||||
*
|
||||
* @param int $id Item ID.
|
||||
* @return array Links for the given item.
|
||||
* @return array[] Array of link arrays for the given item.
|
||||
*/
|
||||
public function prepare_item_links( $id ) {
|
||||
$term = get_term( $id );
|
||||
|
||||
Reference in New Issue
Block a user