WP_Customize_Manager::get_control()publicWP 3.4.0

Retrieves a customize control.

Метод класса: WP_Customize_Manager{}

Хуков нет.

Возвращает

WP_Customize_Control|null. The control object, if set.

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

$WP_Customize_Manager = new WP_Customize_Manager();
$WP_Customize_Manager->get_control( $id );
$id(строка) (обязательный)
ID of the control.

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

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

Код WP_Customize_Manager::get_control() WP 6.4.3

public function get_control( $id ) {
	if ( isset( $this->controls[ $id ] ) ) {
		return $this->controls[ $id ];
	}
}