Skip to content

Instantly share code, notes, and snippets.

@SiR-DanieL
Created December 15, 2016 12:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SiR-DanieL/2108a79cca76b125074c02843269c4a9 to your computer and use it in GitHub Desktop.
Save SiR-DanieL/2108a79cca76b125074c02843269c4a9 to your computer and use it in GitHub Desktop.
/**
* Remove the additional CSS section, introduced in 4.7, from the Customizer.
* @param $wp_customize WP_Customize_Manager
*/
function mycustomfunc_remove_css_section( $wp_customize ) {
$user = wp_get_current_user();
if ( $user->ID !== 1 ) {
$wp_customize->remove_section( 'custom_css' );
}
}
add_action( 'customize_register', 'mycustomfunc_remove_css_section', 15 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment