WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WP_Customize_Section::__construct() public WP 3.4.0


Any supplied $args override class property defaults.

Это метод класса: WP_Customize_Section{}

Хуков нет.


Null. Ничего.


$WP_Customize_Section = new WP_Customize_Section();
$WP_Customize_Section->__construct( $manager, $id, $args );
$manager(WP_Customize_Manager) (обязательный)
Customizer bootstrap instance.
$id(строка) (обязательный)
A specific ID of the section.

Array of properties for the new Section object.

  • priority(число)
    Priority of the section, defining the display order of panels and sections.
    По умолчанию: 160

  • panel(строка)
    The panel this section belongs to (if any).
    По умолчанию: ''

  • capability(строка)
    Capability required for the section.
    По умолчанию: 'edit_theme_options'

  • theme_supports(строка/строка[])
    Theme features required to support the section.

  • title(строка)
    Title of the section to show in UI.

  • description(строка)
    Description to show in the UI.

  • type(строка)
    Type of the section.

  • active_callback(callable)
    Active callback.

  • description_hidden(true/false)
    Hide the description behind a help icon, instead of inline above the first control.
    По умолчанию: false

По умолчанию: empty array

Список изменений

С версии 3.4.0 Введена.

Код WP_Customize_Section::__construct() WP 5.5.1

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.