Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
style: Address lint warning
Disable unused variable warning as the `$request` parameter must be
referenced to satisfy inherited class requirements.

```
Fatal error: Declaration of WP_REST_Block_Editor_Assets_Controller::get_items_permissions_check() must be compatible with WP_REST_Controller::get_items_permissions_check($request) in /var/www/html/wp-content/plugins/gutenberg/lib/experimental/class-wp-rest-block-editor-assets-controller.php on line 144
```
  • Loading branch information
dcalhoun committed Aug 14, 2024
commit 4b4835959fac1a86f7f7a34fcc6a3fd7ec88ae81
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function register_routes() {
*
* @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
*/
public function get_items() {
public function get_items( $request ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
global $wp_styles, $wp_scripts;

$current_wp_styles = $wp_styles;
Expand Down Expand Up @@ -141,7 +141,7 @@ public function get_items() {
*
* @return bool|WP_Error True if the request has permission, WP_Error object otherwise.
*/
public function get_items_permissions_check() {
public function get_items_permissions_check( $request ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
if ( current_user_can( 'edit_posts' ) ) {
return true;
}
Expand Down