Skip to content

Instantly share code, notes, and snippets.

@neilgee
Created April 22, 2016 08:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neilgee/609aaca495c58fb5f18e82d5afb37069 to your computer and use it in GitHub Desktop.
Save neilgee/609aaca495c58fb5f18e82d5afb37069 to your computer and use it in GitHub Desktop.
Default Top Level Panel Sections in WordPress Customizer
<?php
//Extracted Default Panel Sections from /wp-includes/class-wp-customize-manager.php
$this->add_section( new WP_Customize_Themes_Section( $this, 'themes', array(
'title' => $this->theme()->display( 'Name' ),
'capability' => 'switch_themes',
'priority' => 0,
) ) );
$this->add_section( 'title_tagline', array(
'title' => __( 'Site Identity' ),
'priority' => 20,
) );
$this->add_section( 'colors', array(
'title' => __( 'Colors' ),
'priority' => 40,
) );
$this->add_section( 'header_image', array(
'title' => __( 'Header Image' ),
'theme_supports' => 'custom-header',
'priority' => 60,
) );
$this->add_section( 'background_image', array(
'title' => __( 'Background Image' ),
'theme_supports' => 'custom-background',
'priority' => 80,
) );
// Replicate behavior from options-reading.php and hide front page options if there are no pages
if ( get_pages() ) {
$this->add_section( 'static_front_page', array(
'title' => __( 'Static Front Page' ),
// 'theme_supports' => 'static-front-page',
'priority' => 120,
'description' => __( 'Your theme supports a static front page.' ),
) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment