-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the theme editor under tools for FSE themes (#36723)
- Loading branch information
1 parent
1ed3af0
commit 2ce3eea
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
/** | ||
* Moves the theme editor menu items for FSE themes. | ||
* | ||
* @package gutenberg | ||
*/ | ||
|
||
/** | ||
* Moves the "theme editor" under "tools" in FSE themes. | ||
*/ | ||
function gutenberg_move_theme_editor_in_block_themes() { | ||
if ( ! gutenberg_is_fse_theme() || is_multisite() ) { | ||
return; | ||
} | ||
remove_submenu_page( 'themes.php', 'theme-editor.php' ); | ||
add_submenu_page( 'tools.php', __( 'Theme Editor', 'default' ), __( 'Theme Editor', 'default' ), 'edit_themes', 'theme-editor.php' ); | ||
} | ||
|
||
add_action( 'admin_menu', 'gutenberg_move_theme_editor_in_block_themes', 102 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters