Changeset 49088
- Timestamp:
- 10/02/2020 05:45:49 PM (4 years ago)
- Location:
- trunk/src/wp-includes/rest-api
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php
r47122 r49088 141 141 } 142 142 143 $ids = array_map( 'absint', $result[ WP_REST_Search_Handler::RESULT_IDS ] );143 $ids = $result[ WP_REST_Search_Handler::RESULT_IDS ]; 144 144 145 145 $results = array(); … … 187 187 * @since 5.0.0 188 188 * 189 * @param int 189 * @param int|string $id ID of the item to prepare. 190 190 * @param WP_REST_Request $request Request object. 191 191 * @return WP_REST_Response Response object. … … 246 246 self::PROP_ID => array( 247 247 'description' => __( 'Unique identifier for the object.' ), 248 'type' => 'integer',248 'type' => array( 'integer', 'string' ), 249 249 'context' => array( 'view', 'embed' ), 250 250 'readonly' => true, -
trunk/src/wp-includes/rest-api/search/class-wp-rest-search-handler.php
r46586 r49088 80 80 * @since 5.0.0 81 81 * 82 * @param int 83 * @param array $fields Fields to include for the item.82 * @param int|string $id Item ID. 83 * @param array $fields Fields to include for the item. 84 84 * @return array Associative array containing all fields for the item. 85 85 */ … … 91 91 * @since 5.0.0 92 92 * 93 * @param int $id Item ID.93 * @param int|string $id Item ID. 94 94 * @return array Links for the given item. 95 95 */
Note: See TracChangeset
for help on using the changeset viewer.