Skip to content

Instantly share code, notes, and snippets.

@robincornett
Created October 20, 2016 18:17
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robincornett/cb3fd0024fd6eae6eff58da421f722f7 to your computer and use it in GitHub Desktop.
Save robincornett/cb3fd0024fd6eae6eff58da421f722f7 to your computer and use it in GitHub Desktop.
Snippet to remove the Additional CSS section from the Customizer. This section is introduced in WordPress 4.7.
<?php
add_action( 'customize_register', 'prefix_remove_css_section', 15 );
/**
* Remove the additional CSS section, introduced in 4.7, from the Customizer.
* @param $wp_customize WP_Customize_Manager
*/
function prefix_remove_css_section( $wp_customize ) {
$wp_customize->remove_section( 'custom_css' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment