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

Yoast\WP\SEO\Integrations\Third_Party

Elementor_Exclude_Post_Types{} Yoast 1.0

Exclude certain Elementor-specific post types from the indexable table.

Posts with these post types will not be saved to the indexable table.

Хуков нет.

Возвращает

Null. Ничего.

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

$Elementor_Exclude_Post_Types = new Elementor_Exclude_Post_Types();
// use class methods

Методы

  1. exclude_elementor_post_types( $excluded_post_types )
  2. get_conditionals()
  3. register_hooks()

Код Elementor_Exclude_Post_Types{} Yoast 15.6.2

<?php
class Elementor_Exclude_Post_Types implements Integration_Interface {

	/**
	 * Initializes the integration.
	 */
	public function register_hooks() {
		\add_filter( 'wpseo_indexable_excluded_post_types', [ $this, 'exclude_elementor_post_types' ] );
	}

	/**
	 * This integration is only active when the Elementor plugin
	 * is installed and activated.
	 *
	 * @return array|string[] The conditionals.
	 */
	public static function get_conditionals() {
		return [ Elementor_Activated_Conditional::class ];
	}

	/**
	 * Exclude certain Elementor-specific post types from the indexable table.
	 *
	 * Posts with these post types will not be saved to the indexable table.
	 *
	 * @param array $excluded_post_types The excluded post types.
	 *
	 * @return array The excluded post types, including the excluded Elementor post types.
	 */
	public function exclude_elementor_post_types( $excluded_post_types ) {
		$excluded_post_types[] = 'elementor_library';

		return $excluded_post_types;
	}
}