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

WP_Customize_Panel::__construct() public WP 4.0.0

Constructor.

Any supplied $args override class property defaults.

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

Хуков нет.

Возвращает

Null. Ничего.

Использование

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

Array of properties for the new Panel object.

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

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

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

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

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

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

  • active_callback(callable)
    Active callback.

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

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

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

Код WP_Customize_Panel::__construct() WP 5.5.1

wp-includes/class-wp-customize-panel.php
<?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->sections = array(); // Users cannot customize the $sections array.
}