Yoast\WP\SEO\Services\Indexables
Indexable_Version_Manager::needs_upgrade()
Determines if an Indexable version for the type is lower than the current version for that Indexable type.
Метод класса: Indexable_Version_Manager{}
Хуков нет.
Возвращает
true|false
. True if the given version is older than the current latest version.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->needs_upgrade( $object_type, $indexable_version );
- $object_type(строка) (обязательный)
- The Indexable's object type.
- $indexable_version(int) (обязательный)
- The Indexable's version.
Код Indexable_Version_Manager::needs_upgrade() Indexable Version Manager::needs upgrade Yoast 24.0
protected function needs_upgrade( $object_type, $indexable_version ) { $current_indexable_builder_version = $this->indexable_builder_versions->get_latest_version_for_type( $object_type ); // If the Indexable's version is below the current version, that Indexable needs updating. return $indexable_version < $current_indexable_builder_version; }