Works in WordPres 5. *
Removing Customize from Wordpress Admin needs to be removed from the sidebar as well as from the top panel in front
From the sidebar menu
add_action( 'admin_menu', 'remove_customize' ); function remove_customize() { global $submenu; if ( isset( $submenu[ 'themes.php' ] ) ) { foreach ( $submenu[ 'themes.php' ] as $index => $menu_item ) { if(in_array('Customize', $menu_item) || in_array('Customizer', $menu_item) || in_array('customize', $menu_item)) { unset( $submenu[ 'themes.php' ][ $index ] ); } } } }
From the admin bar at the top (in front)
add_action( 'admin_bar_menu', 'remove_customize_menu_bar', 999 ); function remove_customize_menu_bar( $wp_admin_bar ) { $wp_admin_bar->remove_node( 'customize' ); }
This will completely disable the configuration option :)
source share