Yoast\WP\SEO\Initializers
Crawl_Cleanup_Permalinks::register_hooks
Hooks our required hooks.
This is the place to register hooks and filters.
Метод класса: Crawl_Cleanup_Permalinks{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$Crawl_Cleanup_Permalinks = new Crawl_Cleanup_Permalinks(); $Crawl_Cleanup_Permalinks->register_hooks();
Код Crawl_Cleanup_Permalinks::register_hooks() Crawl Cleanup Permalinks::register hooks Yoast 26.5
public function register_hooks() {
if ( $this->options_helper->get( 'clean_campaign_tracking_urls' ) && ! empty( \get_option( 'permalink_structure' ) ) ) {
\add_action( 'template_redirect', [ $this, 'utm_redirect' ], 0 );
}
if ( $this->options_helper->get( 'clean_permalinks' ) && ! empty( \get_option( 'permalink_structure' ) ) ) {
\add_action( 'template_redirect', [ $this, 'clean_permalinks' ], 1 );
}
}