yoast_notifications_before_storage
Filter: yoast_notifications_before_storage Allows developer to filter notifications before saving them.
Использование
add_filter( 'yoast_notifications_before_storage', 'wp_kama_yoast_notifications_before_storage_filter' );
/**
* Function for `yoast_notifications_before_storage` filter-hook.
*
* @param Yoast_Notification[] $notifications
*
* @return Yoast_Notification[]
*/
function wp_kama_yoast_notifications_before_storage_filter( $notifications ){
// filter...
return $notifications;
}
- $notifications(Yoast_Notification[])
- -
Где вызывается хук
yoast_notifications_before_storage
yoast/admin/class-yoast-notification-center.php 627
$filtered_merged_notifications = apply_filters( 'yoast_notifications_before_storage', $merged_notifications );
Где используется хук в Yoast SEO
yoast/inc/class-upgrade.php 380
add_filter( 'yoast_notifications_before_storage', [ $this, 'remove_about_notice' ] );