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

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 17.3

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'           => 15,
		],
		(object) [
			/* translators: %s: Zapier. */
			'name'            => \sprintf( \esc_html__( '%s integration', 'wordpress-seo' ), 'Zapier' ),
			'premium'         => true,
			'setting'         => 'zapier_integration_active',
			'label'           => \sprintf(
			/* translators: 1: Yoast SEO, 2: Zapier. */
				\__( 'Set up automated actions when you publish or update your content. By connecting %1$s with %2$s, you can easily send out your published posts to any of its 2000+ destinations, such as Twitter, Facebook and more.', 'wordpress-seo' ),
				'Yoast SEO',
				'Zapier'
			),
			/* translators: %s: Zapier. */
			'read_more_label' => \sprintf( \__( 'Find out more about our %s integration.', 'wordpress-seo' ), 'Zapier' ),
			'read_more_url'   => 'https://yoa.st/4et',
			'premium_url'     => 'https://yoa.st/46o',
			'order'           => 20,
		],
		(object) [
			/* translators: %s: Algolia. */
			'name'            => \sprintf( \esc_html__( '%s integration', 'wordpress-seo' ), 'Algolia' ),
			'premium'         => true,
			'setting'         => 'algolia_integration_active',
			'label'           => __( 'Improve the quality of your site search! Automatically helps your users find your cornerstone and most important content in your internal search results. It also removes noindexed posts & pages from your site’s search results.', 'wordpress-seo' ),
			/* translators: %s: Algolia. */
			'read_more_label' => \sprintf( \__( 'Find out more about our %s integration.', 'wordpress-seo' ), 'Algolia' ),
			'read_more_url'   => 'https://yoa.st/4eu',
			'premium_url'     => 'https://yoa.st/4ex',
			'order'           => 25,
		],
	];

	/**
	 * 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;
}