WPSEO_Product_Upsell_Notice::get_notification
Gets the notification value.
Метод класса: WPSEO_Product_Upsell_Notice{}
Хуков нет.
Возвращает
Yoast_Notification.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_notification();
Код WPSEO_Product_Upsell_Notice::get_notification() WPSEO Product Upsell Notice::get notification Yoast 27.4
protected function get_notification() {
$message = sprintf(
/* translators: %1$s expands to Yoast SEO, %2$s is a link start tag to the plugin page on WordPress.org, %3$s is the link closing tag. */
__( 'We\'ve noticed you\'ve been using %1$s for some time now; we hope you love it! We\'d be thrilled if you could %2$sgive us a 5 stars rating on WordPress.org%3$s!', 'wordpress-seo' ),
'Yoast SEO',
'<a href="' . WPSEO_Shortlinker::get( 'https://yoa.st/rate-yoast-seo' ) . '">',
'</a>',
) . "\n\n";
$message .= sprintf(
/* translators: %1$s is a link start tag to the bugreport guidelines on the Yoast help center, %2$s is the link closing tag. */
__( 'If you are experiencing issues, %1$splease file a bug report%2$s and we\'ll do our best to help you out.', 'wordpress-seo' ),
'<a href="' . WPSEO_Shortlinker::get( 'https://yoa.st/bugreport' ) . '">',
'</a>',
) . "\n\n";
$message .= $this->get_premium_upsell_section() . "\n\n";
$message .= '<a class="button" href="' . wp_nonce_url( admin_url( '?page=' . WPSEO_Admin::PAGE_IDENTIFIER . '&yoast_dismiss=upsell' ), 'dismiss-5star-upsell' ) . '">' . __( 'Please don\'t show me this notification anymore', 'wordpress-seo' ) . '</a>';
$notification = new Yoast_Notification(
$message,
[
'type' => Yoast_Notification::WARNING,
'id' => 'wpseo-upsell-notice',
'capabilities' => 'wpseo_manage_options',
'priority' => 0.8,
],
);
return $notification;
}