Skip to content

Commit

Permalink
Hide the Customize menu item on Simple Classic wp-admin (#36856)
Browse files Browse the repository at this point in the history
* Remove wpcom gate

* changelog

* Update comment

* Update comment
  • Loading branch information
DustyReagan authored Apr 12, 2024
1 parent cd0cd60 commit dfdd7ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Hide Customize on block themes on Simple Classic sites
Original file line number Diff line number Diff line change
Expand Up @@ -379,11 +379,10 @@ function wpcom_site_menu_handle_dismiss_notice() {
add_action( 'wp_ajax_dismiss_wpcom_site_menu_intro_notice', 'wpcom_site_menu_handle_dismiss_notice' );

/**
* Ensures customizer menu and adminbar items are not visible on a block theme for atomic sites.
* Ensures customizer menu and adminbar items are not visible on a block theme.
*/
function hide_customizer_menu_on_block_theme() {
$is_wpcom = ( defined( 'IS_WPCOM' ) && IS_WPCOM );
if ( ! $is_wpcom && wp_is_block_theme() && ! is_customize_preview() ) {
if ( wp_is_block_theme() && ! is_customize_preview() ) {
remove_action( 'customize_register', 'add_logotool_button', 20 );
remove_action( 'customize_register', 'footercredits_register', 99 );
remove_action( 'customize_register', 'wpcom_disable_customizer_site_icon', 20 );
Expand Down

0 comments on commit dfdd7ab

Please sign in to comment.