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

Yoast_Integration_Toggles::load_toggles() protected Yoast 1.0

Loads the available integration toggles.

Also ensures that the toggles are all Yoast_Feature_Toggle instances and sorted by their order value.

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

Хуки из метода
Возвращает

Массив. List of sorted Yoast_Feature_Toggle instances.

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

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

Код Yoast_Integration_Toggles::load_toggles() Yoast 15.1.1

<?php
protected function load_toggles() {
	$integration_toggles = [
		(object) [
			/* translators: %s: 'SEMrush' */
			'name'            => sprintf( __( '%s integration', 'wordpress-seo' ), 'SEMrush' ),
			'setting'         => 'semrush_integration_active',
			'label'           => sprintf(
				/* translators: %s: 'SEMrush' */
				__( 'The %s integration offers suggestions and insights for keywords related to the entered focus keyphrase.', 'wordpress-seo' ),
				'SEMrush'
			),
			'order'           => 10,
		],
		(object) [
			/* translators: %s: Ryte */
			'name'            => sprintf( __( '%s integration', 'wordpress-seo' ), 'Ryte' ),
			'setting'         => 'ryte_indexability',
			'label'           => sprintf(
			/* translators: 1: Ryte, 2: Yoast SEO */
				__( '%1$s will check weekly if your site is still indexable by search engines and %2$s will notify you when this is not the case.', 'wordpress-seo' ),
				'Ryte',
				'Yoast SEO'
			),
			/* translators: %s: Ryte */
			'read_more_label' => sprintf( __( 'Read more about how %s works.', 'wordpress-seo' ), 'Ryte ' ),
			'read_more_url'   => 'https://yoa.st/2an',
			'order'           => 20,
		],
	];

	/**
	 * Filter to add integration toggles from add-ons.
	 *
	 * @param array $integration_toggles Array with integration toggle objects where each object
	 *                                   should have a `name`, `setting` and `label` property.
	 */
	$integration_toggles = apply_filters( 'wpseo_integration_toggles', $integration_toggles );

	$integration_toggles = array_map( [ $this, 'ensure_toggle' ], $integration_toggles );
	usort( $integration_toggles, [ $this, 'sort_toggles_callback' ] );

	return $integration_toggles;
}