Yoast\WP\SEO\Initializers

Crawl_Cleanup_Permalinks::register_hooks()publicYoast 1.0

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() Yoast 23.4

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 );
	}
}