Title: WP_Customize_Section::__construct
Published: April 25, 2014
Last modified: April 28, 2025

---

# WP_Customize_Section::__construct( WP_Customize_Manager $manager, string $id, array $args = array() )

## In this article

 * [Description](https://developer.wordpress.org/reference/classes/wp_customize_section/__construct/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/classes/wp_customize_section/__construct/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/classes/wp_customize_section/__construct/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_customize_section/__construct/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_customize_section/__construct/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/classes/wp_customize_section/__construct/?output_format=md#user-contributed-notes)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_customize_section/__construct/?output_format=md#wp--skip-link--target)

Constructor.

## 󠀁[Description](https://developer.wordpress.org/reference/classes/wp_customize_section/__construct/?output_format=md#description)󠁿

Any supplied $args override class property defaults.

## 󠀁[Parameters](https://developer.wordpress.org/reference/classes/wp_customize_section/__construct/?output_format=md#parameters)󠁿

 `$manager`[WP_Customize_Manager](https://developer.wordpress.org/reference/classes/wp_customize_manager/)
required

Customizer bootstrap instance.

`$id`stringrequired

A specific ID of the section.

`$args`arrayoptional

Array of properties for the new Section object.

 * `priority` int
 * Priority of the section, defining the display order of panels and sections. Default
   160.
 * `panel` string
 * The panel this section belongs to (if any).
 * `capability` string
 * Capability required for the section.
    Default `'edit_theme_options'`
 * `theme_supports` string|string[]
 * Theme features required to support the section.
 * `title` string
 * Title of the section to show in UI.
 * `description` string
 * Description to show in the UI.
 * `type` string
 * Type of the section.
 * `active_callback` callable
 * Active callback.
 * `description_hidden` bool
 * Hide the description behind a help icon, instead of inline above the first control.
   
   Default false.

Default:`array()`

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_customize_section/__construct/?output_format=md#source)󠁿

    ```php
    public function __construct( $manager, $id, $args = array() ) {
    	$keys = array_keys( get_object_vars( $this ) );
    	foreach ( $keys as $key ) {
    		if ( isset( $args[ $key ] ) ) {
    			$this->$key = $args[ $key ];
    		}
    	}

    	$this->manager = $manager;
    	$this->id      = $id;
    	if ( empty( $this->active_callback ) ) {
    		$this->active_callback = array( $this, 'active_callback' );
    	}
    	self::$instance_count += 1;
    	$this->instance_number = self::$instance_count;

    	$this->controls = array(); // Users cannot customize the $controls array.
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-customize-section.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/class-wp-customize-section.php#L173)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/class-wp-customize-section.php#L173-L190)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_customize_section/__construct/?output_format=md#related)󠁿

| Used by | Description | 
| [WP_Customize_New_Menu_Section::__construct()](https://developer.wordpress.org/reference/classes/wp_customize_new_menu_section/__construct/)`wp-includes/customize/class-wp-customize-new-menu-section.php` |

Constructor.

  | 
| [WP_Customize_Manager::add_section()](https://developer.wordpress.org/reference/classes/wp_customize_manager/add_section/)`wp-includes/class-wp-customize-manager.php` |

Adds a customize section.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_customize_section/__construct/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.4.0](https://developer.wordpress.org/reference/since/3.4.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/classes/wp_customize_section/__construct/?output_format=md#user-contributed-notes)󠁿

 1.   [Skip to note 3 content](https://developer.wordpress.org/reference/classes/wp_customize_section/__construct/?output_format=md#comment-content-4348)
 2.    [Bruno Ribaric](https://profiles.wordpress.org/ribaricplusplus/)  [  6 years ago  ](https://developer.wordpress.org/reference/classes/wp_customize_section/__construct/#comment-4348)
 3.  [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_customize_section%2F__construct%2F%23comment-4348)
     Vote results for this note: 1[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_customize_section%2F__construct%2F%23comment-4348)
 4.  `active_callback` argument is a callback that determines when this section will
     be visible (active) in the customizer. Its value can be something like `is_front_page`
 5.   [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_customize_section%2F__construct%2F%3Freplytocom%3D4348%23feedback-editor-4348)
 6.   [Skip to note 4 content](https://developer.wordpress.org/reference/classes/wp_customize_section/__construct/?output_format=md#comment-content-5883)
 7.    [Andrea Alba](https://profiles.wordpress.org/subjuliodesign/)  [  4 years ago  ](https://developer.wordpress.org/reference/classes/wp_customize_section/__construct/#comment-5883)
 8.  [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_customize_section%2F__construct%2F%23comment-5883)
     Vote results for this note: 1[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_customize_section%2F__construct%2F%23comment-5883)
 9.  In case you want to change the location of your Panel (or Section), these are 
     the priorities of the core sections:
 10. **Site Title & Tagline** (title_tagline): **20**
      **Colors** (colors): **40** **
     Header Image** (header_image): **60** **Background Image** (background_image):**
     80** **Menus (Panel)** (nav_menus): **100** **Widgets (Panel)** (widgets): **110****
     Static Front Page** (static_front_page): **120** **_default:_** **160** **Additional
     CSS** (custom_css): **200**
 11.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_customize_section%2F__construct%2F%3Freplytocom%3D5883%23feedback-editor-5883)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_customize_section%2F__construct%2F)
before being able to contribute a note or feedback.