WordPress как на ладони
Очень Удобный и Быстрый Хостинг для сайтов на WordPress. Рекомендую всем своим клиентам!
класс не описан

Yoast\WP\SEO\Values\Indexables

Indexable_Builder_Versions{} Yoast 1.0

Class Indexable_Builder_Versions

Ищем WP-разработчика! Фулл-тайм, удаленка, хорошая зарплата, соц. пакет. Подробности.
Компания Boosta.

Хуков нет.

Возвращает

null. Ничего.

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

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

Методы

  1. get_latest_version_for_type( $object_type )

Код Indexable_Builder_Versions{} Yoast 17.4

class Indexable_Builder_Versions {

	const DEFAULT_INDEXABLE_BUILDER_VERSION = 1;

	/**
	 * The list of indexable builder versions defined by Yoast SEO Free.
	 * If the key is not in this list, the indexable type will not be managed.
	 * These numbers should be increased if one of the builders implements a new feature.
	 *
	 * @var array
	 */
	protected $indexable_builder_versions_by_type = [
		'date-archive'      => self::DEFAULT_INDEXABLE_BUILDER_VERSION,
		'general'           => self::DEFAULT_INDEXABLE_BUILDER_VERSION,
		'home-page'         => self::DEFAULT_INDEXABLE_BUILDER_VERSION,
		'post'              => self::DEFAULT_INDEXABLE_BUILDER_VERSION,
		'post-type-archive' => self::DEFAULT_INDEXABLE_BUILDER_VERSION,
		'term'              => self::DEFAULT_INDEXABLE_BUILDER_VERSION,
		'user'              => self::DEFAULT_INDEXABLE_BUILDER_VERSION,
		'system-page'       => self::DEFAULT_INDEXABLE_BUILDER_VERSION,
	];

	/**
	 * Provides the most recent version number for an Indexable's object type.
	 *
	 * @param string $object_type The Indexable type for which you want to know the most recent version.
	 *
	 * @return int The most recent version number for the type, or 1 if the version doesn't exist.
	 */
	public function get_latest_version_for_type( $object_type ) {
		if ( ! \array_key_exists( $object_type, $this->indexable_builder_versions_by_type ) ) {
			return self::DEFAULT_INDEXABLE_BUILDER_VERSION;
		}

		return $this->indexable_builder_versions_by_type[ $object_type ];
	}
}