Changeset 51786 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-block-directory-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-block-directory-controller.php
r51676 r51786 110 110 * 111 111 * @since 5.5.0 112 * 113 * @param array $plugin The plugin metadata. 112 * @since 5.9.0 Renamed `$plugin` to `$item` to match parent class for PHP 8 named parameter support. 113 * 114 * @param array $item The plugin metadata. 114 115 * @param WP_REST_Request $request Request object. 115 116 * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. 116 117 */ 117 public function prepare_item_for_response( $plugin, $request ) { 118 public function prepare_item_for_response( $item, $request ) { 119 // Restores the more descriptive, specific name for use within this method. 120 $plugin = $item; 121 118 122 // There might be multiple blocks in a plugin. Only the first block is mapped. 119 123 $block_data = reset( $plugin['blocks'] );
Note: See TracChangeset
for help on using the changeset viewer.