Yoast\WP\SEO\Integrations\Watchers
Indexable_Permalink_Watcher::force_reset_permalinks() public Yoast 1.0
Resets the permalink indexables automatically, if necessary.
{} Это метод класса: Indexable_Permalink_Watcher{}
Хуков нет.
Возвращает
true/false. Whether the reset request ran.
Использование
$Indexable_Permalink_Watcher = new Indexable_Permalink_Watcher(); $Indexable_Permalink_Watcher->force_reset_permalinks();
Код Indexable_Permalink_Watcher::force_reset_permalinks() Indexable Permalink Watcher::force reset permalinks Yoast 15.7
public function force_reset_permalinks() {
if ( \get_option( 'tag_base' ) !== $this->options_helper->get( 'tag_base_url' ) ) {
$this->reset_permalinks_term( null, null, 'tag_base' );
$this->options_helper->set( 'tag_base_url', \get_option( 'tag_base' ) );
}
if ( \get_option( 'category_base' ) !== $this->options_helper->get( 'category_base_url' ) ) {
$this->reset_permalinks_term( null, null, 'category_base' );
$this->options_helper->set( 'category_base_url', \get_option( 'category_base' ) );
}
if ( $this->should_reset_permalinks() ) {
$this->reset_permalinks();
return true;
}
$this->reset_altered_custom_taxonomies();
return true;
}