Changeset 51786 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php
- Timestamp:
- 09/09/2021 06:35:34 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php
r51000 r51786 169 169 * 170 170 * @since 4.7.0 171 * 172 * @param WP_Post_Type $post_type Post type object. 173 * @param WP_REST_Request $request Full details about the request. 171 * @since 5.9.0 Renamed `$post_type` to `$item` to match parent class for PHP 8 named parameter support. 172 * 173 * @param WP_Post_Type $item Post type object. 174 * @param WP_REST_Request $request Full details about the request. 174 175 * @return WP_REST_Response Response object. 175 176 */ 176 public function prepare_item_for_response( $post_type, $request ) { 177 public function prepare_item_for_response( $item, $request ) { 178 // Restores the more descriptive, specific name for use within this method. 179 $post_type = $item; 177 180 $taxonomies = wp_list_filter( get_object_taxonomies( $post_type->name, 'objects' ), array( 'show_in_rest' => true ) ); 178 181 $taxonomies = wp_list_pluck( $taxonomies, 'name' );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)