--- a/wp/wp-includes/rest-api/search/class-wp-rest-search-handler.php Tue Dec 15 15:52:01 2020 +0100
+++ b/wp/wp-includes/rest-api/search/class-wp-rest-search-handler.php Wed Sep 21 18:19:35 2022 +0200
@@ -78,9 +78,10 @@
* Prepares the search result for a given ID.
*
* @since 5.0.0
+ * @since 5.6.0 The `$id` parameter can accept a string.
*
- * @param int $id Item ID.
- * @param array $fields Fields to include for the item.
+ * @param int|string $id Item ID.
+ * @param array $fields Fields to include for the item.
* @return array Associative array containing all fields for the item.
*/
abstract public function prepare_item( $id, array $fields );
@@ -89,8 +90,9 @@
* Prepares links for the search result of a given ID.
*
* @since 5.0.0
+ * @since 5.6.0 The `$id` parameter can accept a string.
*
- * @param int $id Item ID.
+ * @param int|string $id Item ID.
* @return array Links for the given item.
*/
abstract public function prepare_item_links( $id );