WPSEO_Slug_Change_Watcher::register_hooks()publicYoast 1.0

Registers all hooks to WordPress.

Метод класса: WPSEO_Slug_Change_Watcher{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$WPSEO_Slug_Change_Watcher = new WPSEO_Slug_Change_Watcher();
$WPSEO_Slug_Change_Watcher->register_hooks();

Код WPSEO_Slug_Change_Watcher::register_hooks() Yoast 24.0

public function register_hooks() {
	// If the current plugin is Yoast SEO Premium, stop registering.
	if ( YoastSEO()->helpers->product->is_premium() ) {
		return;
	}

	add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_assets' ] );

	// Detect a post trash.
	add_action( 'wp_trash_post', [ $this, 'detect_post_trash' ] );

	// Detect a post delete.
	add_action( 'before_delete_post', [ $this, 'detect_post_delete' ] );

	// Detects deletion of a term.
	add_action( 'delete_term_taxonomy', [ $this, 'detect_term_delete' ] );
}