Created
December 15, 2016 12:04
-
-
Save SirDarcanos/5d4e93879511e79f11c3ebee2b6dba05 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->has_cap( 'manage_options' ) ) { | |
$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