From cd2cb1e3062ae68e4f69f97e6ab4a4b5384070b0 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 18 Aug 2022 14:09:15 +0000 Subject: [PATCH] Coding Standards: Remove a one-time variable in `themes.view.Installer.browse`. Alphabetize the list of possible hook name in `install_themes_pre_*` and `install_themes_*` filters. Follow-up to [53906]. See #56283. Built from https://develop.svn.wordpress.org/trunk@53907 git-svn-id: http://core.svn.wordpress.org/trunk@53466 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/js/theme.js | 7 +------ wp-admin/theme-install.php | 8 ++++---- wp-includes/version.php | 2 +- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/wp-admin/js/theme.js b/wp-admin/js/theme.js index 4faa6db1b5..1c0e12eed4 100644 --- a/wp-admin/js/theme.js +++ b/wp-admin/js/theme.js @@ -1695,14 +1695,9 @@ themes.view.Installer = themes.view.Appearance.extend({ // Create a new collection with the proper theme data // for each section. if ( 'blockthemes' === section ) { - - var request = { tag: 'full-site-editing' }; - // Get the themes by sending Ajax POST request to api.wordpress.org/themes // or searching the local cache. - this.collection.query( request ); - return; - + this.collection.query( { tag: 'full-site-editing' } ); } else { this.collection.query( { browse: section } ); } diff --git a/wp-admin/theme-install.php b/wp-admin/theme-install.php index 1fd5a6739b..368ff9f898 100644 --- a/wp-admin/theme-install.php +++ b/wp-admin/theme-install.php @@ -90,16 +90,16 @@ if ( $tab ) { * * Possible hook names include: * + * - `install_themes_pre_blockthemes` * - `install_themes_pre_dashboard` * - `install_themes_pre_featured` * - `install_themes_pre_new` * - `install_themes_pre_search` * - `install_themes_pre_updated` * - `install_themes_pre_upload` - * - `install_themes_pre_blockthemes` * * @since 2.8.0 - * @since 6.1.0 Added `install_themes_pre_blockthemes`. + * @since 6.1.0 Added `install_themes_pre_blockthemes` hook name. */ do_action( "install_themes_pre_{$tab}" ); } @@ -266,16 +266,16 @@ if ( $tab ) { * * Possible hook names include: * + * - `install_themes_blockthemes` * - `install_themes_dashboard` * - `install_themes_featured` * - `install_themes_new` * - `install_themes_search` * - `install_themes_updated` * - `install_themes_upload` - * - `install_themes_blockthemes` * * @since 2.8.0 - * @since 6.1.0 Added `install_themes_blockthemes`. + * @since 6.1.0 Added `install_themes_blockthemes` hook name. * * @param int $paged Number of the current page of results being viewed. */ diff --git a/wp-includes/version.php b/wp-includes/version.php index 5ff8aff311..5669f6e287 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-53906'; +$wp_version = '6.1-alpha-53907'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.