WPSEO_Paper_Presenter::collapsible_config()protectedYoast 1.0

Retrieves the collapsible config based on the settings.

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

Хуков нет.

Возвращает

Массив. The config.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->collapsible_config();

Код WPSEO_Paper_Presenter::collapsible_config() Yoast 22.4

protected function collapsible_config() {
	if ( empty( $this->settings['collapsible'] ) ) {
		return [
			'toggle_icon' => '',
			'class'       => '',
			'expanded'    => '',
		];
	}

	if ( ! empty( $this->settings['expanded'] ) ) {
		return [
			'toggle_icon' => 'dashicons-arrow-up-alt2',
			'class'       => 'toggleable-container',
			'expanded'    => 'true',
		];
	}

	return [
		'toggle_icon' => 'dashicons-arrow-down-alt2',
		'class'       => 'toggleable-container toggleable-container-hidden',
		'expanded'    => 'false',
	];
}