From fe097d1686f6eea3e7a347ad5f361c1bbd6ce1f8 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 17 Sep 2023 02:08:25 +0000 Subject: [PATCH] Coding Standards: Fix a few newly introduced WPCS issues. Follow-up to [56515], [56557], [56560]. Props jrf. See #59161, #58831. git-svn-id: https://develop.svn.wordpress.org/trunk@56598 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/menu.php | 8 ++++---- src/wp-includes/blocks.php | 2 +- tests/phpunit/tests/formatting/wpTrimExcerpt.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/wp-admin/menu.php b/src/wp-admin/menu.php index 6a90772155a54..567af4ae40bf2 100644 --- a/src/wp-admin/menu.php +++ b/src/wp-admin/menu.php @@ -63,8 +63,8 @@ // $menu[5] = Posts. -$menu[10] = array( __( 'Media' ), 'upload_files', 'upload.php', '', 'menu-top menu-icon-media', 'menu-media', 'dashicons-admin-media' ); - $submenu['upload.php'][5] = array( __( 'Library' ), 'upload_files', 'upload.php' ); +$menu[10] = array( __( 'Media' ), 'upload_files', 'upload.php', '', 'menu-top menu-icon-media', 'menu-media', 'dashicons-admin-media' ); + $submenu['upload.php'][5] = array( __( 'Library' ), 'upload_files', 'upload.php' ); $submenu['upload.php'][10] = array( __( 'Add New Media File' ), 'upload_files', 'media-new.php' ); $i = 15; foreach ( get_taxonomies_for_attachments( 'objects' ) as $tax ) { @@ -76,8 +76,8 @@ } unset( $tax, $i ); -$menu[15] = array( __( 'Links' ), 'manage_links', 'link-manager.php', '', 'menu-top menu-icon-links', 'menu-links', 'dashicons-admin-links' ); - $submenu['link-manager.php'][5] = array( _x( 'All Links', 'admin menu' ), 'manage_links', 'link-manager.php' ); +$menu[15] = array( __( 'Links' ), 'manage_links', 'link-manager.php', '', 'menu-top menu-icon-links', 'menu-links', 'dashicons-admin-links' ); + $submenu['link-manager.php'][5] = array( _x( 'All Links', 'admin menu' ), 'manage_links', 'link-manager.php' ); $submenu['link-manager.php'][10] = array( __( 'Add New Link' ), 'manage_links', 'link-add.php' ); $submenu['link-manager.php'][15] = array( __( 'Link Categories' ), 'manage_categories', 'edit-tags.php?taxonomy=link_category' ); diff --git a/src/wp-includes/blocks.php b/src/wp-includes/blocks.php index edd76e1b0effe..07bbd5ab01c19 100644 --- a/src/wp-includes/blocks.php +++ b/src/wp-includes/blocks.php @@ -872,7 +872,7 @@ function serialize_blocks( $blocks, $callback = null ) { $result = ''; foreach ( $blocks as $block ) { $result .= serialize_block( $block, $callback ); - }; + } return $result; } diff --git a/tests/phpunit/tests/formatting/wpTrimExcerpt.php b/tests/phpunit/tests/formatting/wpTrimExcerpt.php index d588c01174030..faa67d904a900 100644 --- a/tests/phpunit/tests/formatting/wpTrimExcerpt.php +++ b/tests/phpunit/tests/formatting/wpTrimExcerpt.php @@ -181,7 +181,7 @@ public function test_wp_trim_excerpt_unhooks_do_blocks() { $has_filter = true; add_filter( 'the_content', - static function( $content ) use ( &$has_filter ) { + static function ( $content ) use ( &$has_filter ) { $has_filter = has_filter( 'the_content', 'do_blocks' ); return $content; }