WPSEO_Addon_Manager::create_notification()
Creates an instance of Yoast_Notification.
Метод класса: WPSEO_Addon_Manager{}
Хуков нет.
Возвращает
Yoast_Notification
. The created notification.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->create_notification( $product_name, $short_link );
- $product_name(строка) (обязательный)
- The product to create the notification for.
- $short_link(строка) (обязательный)
- The short link for the addon notification.
Код WPSEO_Addon_Manager::create_notification() WPSEO Addon Manager::create notification Yoast 22.4
protected function create_notification( $product_name, $short_link ) { $notification_options = [ 'type' => Yoast_Notification::ERROR, 'id' => 'wpseo-dismiss-' . sanitize_title_with_dashes( $product_name, null, 'save' ), 'capabilities' => 'wpseo_manage_options', ]; return new Yoast_Notification( sprintf( /* translators: %1$s expands to a strong tag, %2$s expands to the product name, %3$s expands to a closing strong tag, %4$s expands to an a tag. %5$s expands to MyYoast, %6$s expands to a closing a tag, %7$s expands to the product name */ __( '%1$s %2$s isn\'t working as expected %3$s and you are not receiving updates or support! Make sure to %4$s activate your product subscription in %5$s%6$s to unlock all the features of %7$s.', 'wordpress-seo' ), '<strong>', $product_name, '</strong>', '<a href="' . WPSEO_Shortlinker::get( $short_link ) . '" target="_blank">', 'MyYoast', '</a>', $product_name ), $notification_options ); }