X7ROOT File Manager
Current Path:
/home/katmhsmi/public_html/wp-content/plugins/wordpress-seo/admin
home
/
katmhsmi
/
public_html
/
wp-content
/
plugins
/
wordpress-seo
/
admin
/
📁
..
📄
admin-settings-changed-listener.php
(2.39 KB)
📁
ajax
📄
ajax.php
(11.16 KB)
📁
capabilities
📄
class-admin-asset-analysis-worker-location.php
(1.81 KB)
📄
class-admin-asset-dev-server-location.php
(1.63 KB)
📄
class-admin-asset-location.php
(488 B)
📄
class-admin-asset-manager.php
(19.67 KB)
📄
class-admin-asset-seo-location.php
(2.08 KB)
📄
class-admin-editor-specific-replace-vars.php
(6.34 KB)
📄
class-admin-gutenberg-compatibility-notification.php
(2.55 KB)
📄
class-admin-help-panel.php
(2.7 KB)
📄
class-admin-init.php
(10.71 KB)
📄
class-admin-recommended-replace-vars.php
(5.98 KB)
📄
class-admin-user-profile.php
(3.25 KB)
📄
class-admin-utils.php
(2.14 KB)
📄
class-admin.php
(12.73 KB)
📄
class-asset.php
(4.3 KB)
📄
class-bulk-description-editor-list-table.php
(2.05 KB)
📄
class-bulk-editor-list-table.php
(29.41 KB)
📄
class-bulk-title-editor-list-table.php
(2.23 KB)
📄
class-collector.php
(1005 B)
📄
class-config.php
(4.88 KB)
📄
class-database-proxy.php
(7.5 KB)
📄
class-export.php
(3.46 KB)
📄
class-expose-shortlinks.php
(8.23 KB)
📄
class-gutenberg-compatibility.php
(2.47 KB)
📄
class-meta-columns.php
(27.3 KB)
📄
class-my-yoast-proxy.php
(6.14 KB)
📄
class-option-tab.php
(2.21 KB)
📄
class-option-tabs-formatter.php
(2.84 KB)
📄
class-option-tabs.php
(2.26 KB)
📄
class-paper-presenter.php
(3.52 KB)
📄
class-plugin-availability.php
(10.06 KB)
📄
class-plugin-conflict.php
(4.04 KB)
📄
class-premium-popup.php
(2.81 KB)
📄
class-premium-upsell-admin-block.php
(5.11 KB)
📄
class-primary-term-admin.php
(7.35 KB)
📄
class-product-upsell-notice.php
(5.75 KB)
📄
class-remote-request.php
(3.13 KB)
📄
class-schema-person-upgrade-notification.php
(2.23 KB)
📄
class-suggested-plugins.php
(4.33 KB)
📄
class-wincher-dashboard-widget.php
(3.53 KB)
📄
class-yoast-columns.php
(3.52 KB)
📄
class-yoast-dashboard-widget.php
(3.96 KB)
📄
class-yoast-form.php
(35.74 KB)
📄
class-yoast-input-validation.php
(7.2 KB)
📄
class-yoast-network-admin.php
(9.97 KB)
📄
class-yoast-network-settings-api.php
(4.18 KB)
📄
class-yoast-notification-center.php
(26.06 KB)
📄
class-yoast-notification.php
(9.82 KB)
📄
class-yoast-notifications.php
(7.63 KB)
📄
class-yoast-plugin-conflict.php
(10.33 KB)
📁
endpoints
📁
exceptions
📁
filters
📁
formatter
📁
google_search_console
📁
import
📄
index.php
(38 B)
📄
interface-collection.php
(257 B)
📄
interface-installable.php
(254 B)
📁
listeners
📁
menu
📁
metabox
📁
notifiers
📁
pages
📁
roles
📁
services
📁
statistics
📁
taxonomy
📁
tracking
📁
views
📁
watchers
Editing: class-product-upsell-notice.php
<?php /** * WPSEO plugin file. * * @package WPSEO\Admin */ /** * Represents the upsell notice. */ class WPSEO_Product_Upsell_Notice { /** * Holds the name of the user meta key. * * The value of this database field holds whether the user has dismissed this notice or not. * * @var string */ public const USER_META_DISMISSED = 'wpseo-remove-upsell-notice'; /** * Holds the option name. * * @var string */ public const OPTION_NAME = 'wpseo'; /** * Holds the options. * * @var array */ protected $options; /** * Sets the options, because they always have to be there on instance. */ public function __construct() { $this->options = $this->get_options(); } /** * Checks if the notice should be added or removed. * * @return void */ public function initialize() { $this->remove_notification(); } /** * Sets the upgrade notice. * * @return void */ public function set_upgrade_notice() { if ( $this->has_first_activated_on() ) { return; } $this->set_first_activated_on(); $this->add_notification(); } /** * Listener for the upsell notice. * * @return void */ public function dismiss_notice_listener() { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are validating a nonce here. if ( ! isset( $_GET['_wpnonce'] ) || ! wp_verify_nonce( $_GET['_wpnonce'], 'dismiss-5star-upsell' ) ) { return; } $dismiss_upsell = isset( $_GET['yoast_dismiss'] ) && is_string( $_GET['yoast_dismiss'] ) ? sanitize_text_field( wp_unslash( $_GET['yoast_dismiss'] ) ) : ''; if ( $dismiss_upsell !== 'upsell' ) { return; } $this->dismiss_notice(); if ( wp_safe_redirect( admin_url( 'admin.php?page=wpseo_dashboard' ) ) ) { exit; } } /** * When the notice should be shown. * * @return bool */ protected function should_add_notification() { return ( $this->options['first_activated_on'] < strtotime( '-2weeks' ) ); } /** * Checks if the options has a first activated on date value. * * @return bool */ protected function has_first_activated_on() { return $this->options['first_activated_on'] !== false; } /** * Sets the first activated on. * * @return void */ protected function set_first_activated_on() { $this->options['first_activated_on'] = strtotime( '-2weeks' ); $this->save_options(); } /** * Adds a notification to the notification center. * * @return void */ protected function add_notification() { $notification_center = Yoast_Notification_Center::get(); $notification_center->add_notification( $this->get_notification() ); } /** * Removes a notification to the notification center. * * @return void */ protected function remove_notification() { $notification_center = Yoast_Notification_Center::get(); $notification_center->remove_notification( $this->get_notification() ); } /** * Returns a premium upsell section if using the free plugin. * * @return string */ protected function get_premium_upsell_section() { if ( ! YoastSEO()->helpers->product->is_premium() ) { return sprintf( /* translators: %1$s expands anchor to premium plugin page, %2$s expands to </a> */ __( 'By the way, did you know we also have a %1$sPremium plugin%2$s? It offers advanced features, like a redirect manager and support for multiple keyphrases. It also comes with 24/7 personal support.', 'wordpress-seo' ), "<a href='" . WPSEO_Shortlinker::get( 'https://yoa.st/premium-notification' ) . "'>", '</a>' ); } return ''; } /** * Gets the notification value. * * @return Yoast_Notification */ 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; } /** * Dismisses the notice. * * @return bool */ protected function is_notice_dismissed() { return get_user_meta( get_current_user_id(), self::USER_META_DISMISSED, true ) === '1'; } /** * Dismisses the notice. * * @return void */ protected function dismiss_notice() { update_user_meta( get_current_user_id(), self::USER_META_DISMISSED, true ); } /** * Returns the set options. * * @return mixed */ protected function get_options() { return get_option( self::OPTION_NAME ); } /** * Saves the options to the database. * * @return void */ protected function save_options() { update_option( self::OPTION_NAME, $this->options ); } }
Upload File
Create Folder