Themes: Add a Block Themes filter in Theme Install Screen.
The Theme Directory on wordpress.org recently got updated to show a shortcut for filtering block themes. This changeset adds a "Block Themes" filter when adding a new theme from WordPress administration. It also introduces two new action hooks: `install_themes_pre_blockthemes` (fires before the tab is rendered) and `install_themes_blockthemes` (fires at the top the tab). Follow-up to [meta11963]. Props luminuu, audrasjb, SergeyBiryukov, rafiahmedd. Fixes #56283. See #meta6330. Built from https://develop.svn.wordpress.org/trunk@53906 git-svn-id: http://core.svn.wordpress.org/trunk@53465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -96,8 +96,10 @@ if ( $tab ) {
|
||||
* - `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`.
|
||||
*/
|
||||
do_action( "install_themes_pre_{$tab}" );
|
||||
}
|
||||
@@ -185,6 +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="favorites"><?php _ex( 'Favorites', 'themes' ); ?></a></li>
|
||||
</ul>
|
||||
|
||||
@@ -269,8 +272,10 @@ if ( $tab ) {
|
||||
* - `install_themes_search`
|
||||
* - `install_themes_updated`
|
||||
* - `install_themes_upload`
|
||||
* - `install_themes_blockthemes`
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @since 6.1.0 Added `install_themes_blockthemes`.
|
||||
*
|
||||
* @param int $paged Number of the current page of results being viewed.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user