WP_Customize_Section::__construct( WP_Customize_Manager $manager, string $id, array $args = array() )
Constructor.
Description Description
Any supplied $args override class property defaults.
Parameters Parameters
- $manager
-
(WP_Customize_Manager) (Required) Customizer bootstrap instance.
- $id
-
(string) (Required) An specific ID of the section.
- $args
-
(array) (Optional) Section arguments.
Default value: array()
Source Source
File: wp-includes/class-wp-customize-section.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. }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
3.4.0 | Introduced. |