Themes: Include a hyphen in the Block Themes tab key on Add Themes screen.
This better matches the tab name and changes the associated action hooks to: * `install_themes_pre_block-themes` (fires before the tab is rendered) * `install_themes_block-themes` (fires at the top the tab) While including a mix of underscores and hyphens in a hook name is not quite typical for core, it does have a precedent and brings more consistency with similar filters on Add Plugin screen: * `install_plugins_pre_plugin-information` * `install_plugins_plugin-information` Follow-up to [53906], [53907]. Fixes #56283. Built from https://develop.svn.wordpress.org/trunk@53908 git-svn-id: http://core.svn.wordpress.org/trunk@53467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cd2cb1e306
commit
9c95525ad8
|
@ -1694,7 +1694,7 @@ themes.view.Installer = themes.view.Appearance.extend({
|
|||
browse: function( section ) {
|
||||
// Create a new collection with the proper theme data
|
||||
// for each section.
|
||||
if ( 'blockthemes' === section ) {
|
||||
if ( 'block-themes' === section ) {
|
||||
// Get the themes by sending Ajax POST request to api.wordpress.org/themes
|
||||
// or searching the local cache.
|
||||
this.collection.query( { tag: 'full-site-editing' } );
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -90,7 +90,7 @@ if ( $tab ) {
|
|||
*
|
||||
* Possible hook names include:
|
||||
*
|
||||
* - `install_themes_pre_blockthemes`
|
||||
* - `install_themes_pre_block-themes`
|
||||
* - `install_themes_pre_dashboard`
|
||||
* - `install_themes_pre_featured`
|
||||
* - `install_themes_pre_new`
|
||||
|
@ -99,7 +99,7 @@ if ( $tab ) {
|
|||
* - `install_themes_pre_upload`
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @since 6.1.0 Added `install_themes_pre_blockthemes` hook name.
|
||||
* @since 6.1.0 Added the `install_themes_pre_block-themes` hook name.
|
||||
*/
|
||||
do_action( "install_themes_pre_{$tab}" );
|
||||
}
|
||||
|
@ -187,7 +187,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
|
|||
<ul class="filter-links">
|
||||
<li><a href="#" data-sort="popular"><?php _ex( 'Popular', 'themes' ); ?></a></li>
|
||||
<li><a href="#" data-sort="new"><?php _ex( 'Latest', 'themes' ); ?></a></li>
|
||||
<li><a href="#" data-sort="blockthemes"><?php _ex( 'Block Themes', 'themes' ); ?></a></li>
|
||||
<li><a href="#" data-sort="block-themes"><?php _ex( 'Block Themes', 'themes' ); ?></a></li>
|
||||
<li><a href="#" data-sort="favorites"><?php _ex( 'Favorites', 'themes' ); ?></a></li>
|
||||
</ul>
|
||||
|
||||
|
@ -266,7 +266,7 @@ if ( $tab ) {
|
|||
*
|
||||
* Possible hook names include:
|
||||
*
|
||||
* - `install_themes_blockthemes`
|
||||
* - `install_themes_block-themes`
|
||||
* - `install_themes_dashboard`
|
||||
* - `install_themes_featured`
|
||||
* - `install_themes_new`
|
||||
|
@ -275,7 +275,7 @@ if ( $tab ) {
|
|||
* - `install_themes_upload`
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @since 6.1.0 Added `install_themes_blockthemes` hook name.
|
||||
* @since 6.1.0 Added the `install_themes_block-themes` hook name.
|
||||
*
|
||||
* @param int $paged Number of the current page of results being viewed.
|
||||
*/
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.1-alpha-53907';
|
||||
$wp_version = '6.1-alpha-53908';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue