Yoast\WP\SEO\Helpers
Indexable_Helper::reset_permalink_indexables()
Resets the permalinks of the indexables.
Метод класса: Indexable_Helper{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$Indexable_Helper = new Indexable_Helper(); $Indexable_Helper->reset_permalink_indexables( $type, $subtype, $reason );
- $type(строка|null)
- The type of the indexable.
По умолчанию: null - $subtype(строка|null)
- The subtype. Can be null.
По умолчанию: null - $reason(строка)
- The reason that the permalink has been changed.
По умолчанию: Indexing_Reasons::REASON_PERMALINK_SETTINGS
Код Indexable_Helper::reset_permalink_indexables() Indexable Helper::reset permalink indexables Yoast 24.4
public function reset_permalink_indexables( $type = null, $subtype = null, $reason = Indexing_Reasons::REASON_PERMALINK_SETTINGS ) { $result = $this->repository->reset_permalink( $type, $subtype ); $this->indexing_helper->set_reason( $reason ); if ( $result !== false && $result > 0 ) { \delete_transient( Indexable_Post_Indexation_Action::UNINDEXED_COUNT_TRANSIENT ); \delete_transient( Indexable_Post_Type_Archive_Indexation_Action::UNINDEXED_COUNT_TRANSIENT ); \delete_transient( Indexable_Term_Indexation_Action::UNINDEXED_COUNT_TRANSIENT ); } }