PATH:
home
/
letacommog
/
newrdv1
/
wp-content
/
plugins1
/
wordpress-seo-premium.13.4.1
/
premium
/
classes
<?php /** * WPSEO plugin file. * * @package WPSEO\Admin\Notifiers */ /** * Represents the logic for showing the recalibration beta notice. * * @deprecated 10.0 */ class WPSEO_Premium_Stale_Cornerstone_Content_Notification implements WPSEO_WordPress_Integration { /** * The name of the notifier. * * @var string */ protected $notification_identifier = 'stale-content-notification'; /** * Class constructor. * * @deprecated 10.0 * * @codeCoverageIgnore */ public function __construct() { _deprecated_constructor( 'WPSEO_Premium_Stale_Cornerstone_Content_Notification', '10.0' ); } /** * Registers all hooks to WordPress * * @codeCoverageIgnore * * @return void */ public function register_hooks() { add_action( 'admin_init', [ $this, 'handle_notice' ], 15 ); } /** * Shows the notification when applicable. * * @codeCoverageIgnore * * @return void. */ public function handle_notice() { if ( $this->show_notice( WPSEO_Options::get( 'enable_cornerstone_content' ) ) ) { $this->get_notification_center()->add_notification( $this->get_notification() ); return; } $this->get_notification_center()->remove_notification_by_id( 'wpseo-' . $this->notification_identifier ); } /** * Returns the notification. * * @codeCoverageIgnore * * @return Yoast_Notification The notification for the notification center. */ protected function get_notification() { $message = $this->get_notification_message( WPSEO_Post_Type::get_accessible_post_types() ); $message .= ' '; $message .= sprintf( /* translators: 1: Opening link tag to an article about stale content, 2: closing tag */ esc_html__( 'Read more about %1$swhy you should always keep your cornerstone content up-to-date%2$s.', 'wordpress-seo-premium' ), '<a href="' . WPSEO_Shortlinker::get( 'https://yoa.st/stale-content-filter' ) . '" target="_blank">', '</a>' ); $notification_options = [ 'type' => Yoast_Notification::WARNING, 'id' => 'wpseo-' . $this->notification_identifier, 'priority' => 1.0, 'capabilities' => 'wpseo_manage_options', ]; return new Yoast_Notification( $message, $notification_options ); } /** * Generates the notification message based on the available post type. * * @codeCoverageIgnore * * @param array $post_types The accessible post types. * * @return string The notification message. */ protected function get_notification_message( array $post_types ) { if ( array_key_exists( 'post', $post_types ) ) { return sprintf( /* translators: 1: Opening link tag to the post overview, 2: closing tag */ esc_html__( 'In this beta, we introduce a stale cornerstone content filter. You can find it %1$son the post overview%2$s. This functionality is also available for other content types.', 'wordpress-seo-premium' ), '<a href="' . admin_url( 'edit.php' ) . '">', '</a>' ); } if ( array_key_exists( 'page', $post_types ) ) { return sprintf( /* translators: 1: Opening link tag to the page overview, 2: closing tag */ esc_html__( 'In this beta, we introduce a stale cornerstone content filter. You can find it %1$son the page overview%2$s. This functionality is also available for other content types.', 'wordpress-seo-premium' ), '<a href="' . admin_url( 'edit.php?post_type=page' ) . '">', '</a>' ); } return esc_html__( 'In this beta, we introduce a stale cornerstone content filter. You can find it on content type overviews.', 'wordpress-seo-premium' ); } /** * Determines if the notice should be shown. * * @codeCoverageIgnore * * @param bool $is_cornerstone_content_enabled Is the cornerstone content enabled. * * @return bool True when a notice should be shown. */ protected function show_notice( $is_cornerstone_content_enabled ) { return $is_cornerstone_content_enabled; } /** * Retrieves an instance of the notification center. * * @codeCoverageIgnore * * @return Yoast_Notification_Center Instance of the notification center. */ protected function get_notification_center() { return Yoast_Notification_Center::get(); } }
[+]
..
[-] premium-prominent-words-link-endpoint.php
[edit]
[-] premium-prominent-words-recalculation.php
[edit]
[-] premium-orphaned-post-notifier.php
[edit]
[+]
redirect
[-] premium-prominent-words-support.php
[edit]
[-] premium-post-data-service.php
[edit]
[-] premium-assets.php
[edit]
[-] premium-redirect-service.php
[edit]
[-] facebook-profile.php
[edit]
[-] premium-prominent-words-link-service.php
[edit]
[-] .classes.php
[edit]
[-] premium-prominent-words-recalculation-notifier.php
[edit]
[-] premium-free-translations.php
[edit]
[-] premium-redirect-endpoint.php
[edit]
[-] premium-post-data-endpoint.php
[edit]
[-] premium-gsc.php
[edit]
[-] premium-prominent-words-language-support.php
[edit]
[-] premium-orphaned-content-support.php
[edit]
[-] premium-metabox.php
[edit]
[-] premium-link-suggestions-service.php
[edit]
[-] validation-error.php
[edit]
[-] premium-autoloader.php
[edit]
[-] social-previews.php
[edit]
[-] premium-prominent-words-versioning.php
[edit]
[+]
export
[-] multi-keyword.php
[edit]
[-] premium-link-suggestions-endpoint.php
[edit]
[-] premium-redirect-option.php
[edit]
[-] upgrade-manager.php
[edit]
[-] post-watcher.php
[edit]
[-] metabox-link-suggestions.php
[edit]
[-] premium-prominent-words-recalculation-endpoint.php
[edit]
[-] premium-expose-shortlinks.php
[edit]
[-] premium-asset-js-l10n.php
[edit]
[-] premium-import-manager.php
[edit]
[-] premium-prominent-words-endpoint.php
[edit]
[-] term-watcher.php
[edit]
[-] watcher.php
[edit]
[-] premium-prominent-words-registration.php
[edit]
[-] premium-orphaned-content-utils.php
[edit]
[-] premium-redirect-export-manager.php
[edit]
[-] premium-javascript-strings.php
[edit]
[-] validation-result.php
[edit]
[-] premium-register-capabilities.php
[edit]
[-] premium-stale-cornerstone-content-notification.php
[edit]
[-] product-premium.php
[edit]
[-] premium-keyword-export-manager.php
[edit]
[-] validation-warning.php
[edit]
[-] premium-stale-cornerstone-content-filter.php
[edit]
[-] premium-gsc-modal.php
[edit]
[-] premium-orphaned-post-query.php
[edit]
[-] premium-prominent-words-unindexed-post-query.php
[edit]
[-] premium-prominent-words-service.php
[edit]
[+]
views
[-] custom-fields-plugin.php
[edit]
[-] premium-orphaned-post-filter.php
[edit]
[-] premium-prominent-words-recalculation-service.php
[edit]