WPSEO_Option_Titles::get_separator_options_for_display()publicYoast 1.0

Get the available separator options aria-labels.

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

Хуков нет.

Возвращает

Строку[]. Array with the separator options aria-labels.

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

$WPSEO_Option_Titles = new WPSEO_Option_Titles();
$WPSEO_Option_Titles->get_separator_options_for_display();

Код WPSEO_Option_Titles::get_separator_options_for_display() Yoast 22.4

public function get_separator_options_for_display() {
	$separators     = $this->get_separator_options();
	$separator_list = self::get_separator_option_list();

	$separator_options = [];

	foreach ( $separators as $key => $label ) {
		$aria_label = ( $separator_list[ $key ]['label'] ?? '' );

		$separator_options[ $key ] = [
			'label'      => $label,
			'aria_label' => $aria_label,
		];
	}

	return $separator_options;
}