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.

git-svn-id: https://develop.svn.wordpress.org/trunk@53908 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2022-08-19 13:09:12 +00:00
parent 459e5d52ac
commit 74fa60b30a
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -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' } );