Yoast\WP\SEO\Integrations\Admin
Indexing_Notification_Integration::register_hooks() public Yoast 1.0
Initializes the integration.
Adds hooks and jobs to cleanup or add the notification when necessary.
{} Это метод класса: Indexing_Notification_Integration{}
Хуков нет.
Возвращает
null.
Использование
$Indexing_Notification_Integration = new Indexing_Notification_Integration(); $Indexing_Notification_Integration->register_hooks();
Код Indexing_Notification_Integration::register_hooks() Indexing Notification Integration::register hooks Yoast 15.6.2
public function register_hooks() {
if ( $this->page_helper->get_current_yoast_seo_page() === 'wpseo_dashboard' ) {
\add_action( 'admin_init', [ $this, 'maybe_cleanup_notification' ] );
}
if ( $this->indexing_helper->has_reason() ) {
\add_action( 'admin_init', [ $this, 'maybe_create_notification' ] );
}
\add_action( self::NOTIFICATION_ID, [ $this, 'maybe_create_notification' ] );
}