wpseo_notification_capabilities
Filter capabilities that enable the displaying of this notification.
Использование
add_filter( 'wpseo_notification_capabilities', 'wp_kama_wpseo_notification_capabilities_filter', 10, 2 ); /** * Function for `wpseo_notification_capabilities` filter-hook. * * @param array $capabilities The capabilities that must be present for this notification. * @param Yoast_Notification $notification The notification object. * * @return array */ function wp_kama_wpseo_notification_capabilities_filter( $capabilities, $notification ){ // filter... return $capabilities; }
- $capabilities(массив)
- The capabilities that must be present for this notification.
- $notification(Yoast_Notification)
- The notification object.
Список изменений
С версии 3.2 | Введена. |
Где вызывается хук
wpseo_notification_capabilities
yoast/admin/class-yoast-notification.php 240
$capabilities = apply_filters( 'wpseo_notification_capabilities', $this->options['capabilities'], $this );