Created
December 15, 2016 12:23
-
-
Save SirDarcanos/2108a79cca76b125074c02843269c4a9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/** | |
* 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