Skip to content

Commit

Permalink
Removes some default customizer fields we never use on projects (#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
coreymcollins authored and gregrickaby committed Aug 31, 2018
1 parent 7434d33 commit 0fe8c62
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions inc/customizer/customizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,26 @@
* @package _s
*/

/**
* Removes default customizer fields that we generally don't use.
*
* @param object $wp_customize The default Customizer settings.
* @author Corey Collins
*/
function _s_remove_default_customizer_sections( $wp_customize ) {

// Remove sections.
$wp_customize->remove_section( 'custom_css' );
$wp_customize->remove_section( 'static_front_page' );
$wp_customize->remove_section( 'background_image' );
$wp_customize->remove_section( 'colors' );

// Remove panels.
$wp_customize->remove_panel( 'nav_menus' );
$wp_customize->remove_panel( 'widgets' );
}
add_action( 'customize_register', '_s_remove_default_customizer_sections', 15 );

/**
* Include other customizer files.
*/
Expand Down

0 comments on commit 0fe8c62

Please sign in to comment.