403Webshell
Server IP : 68.178.247.200  /  Your IP : 216.73.217.50
Web Server : Apache
System : Linux p3plzcpnl489463.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User : x9dppmxs4rgd ( 8559391)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/x9dppmxs4rgd/www/wp-content/plugins/ewww-image-optimizer/classes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/x9dppmxs4rgd/www/wp-content/plugins/ewww-image-optimizer/classes/class-eio-hs-beacon.php
<?php
/**
 * Help integration functions for embedding the HS Beacon for users that have opted in.
 *
 * @package     EIO
 * @since       3.5.1
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

if ( ! class_exists( 'EIO_HS_Beacon' ) ) {
	/**
	 * Embed HS Beacon to give users more help when they need it.
	 *
	 * @since  3.5.1
	 */
	class EIO_HS_Beacon extends EIO_Base {

		/**
		 * Get things going
		 */
		public function __construct() {
			parent::__construct( __FILE__ );
			add_action( 'admin_action_eio_opt_into_hs_beacon', array( $this, 'check_for_optin' ) );
			add_action( 'admin_action_eio_opt_out_of_hs_beacon', array( $this, 'check_for_optout' ) );
		}

		/**
		 * Check for a new opt-in via the admin notice
		 */
		public function check_for_optin() {
			$this->debug_message( '<b>' . __METHOD__ . '()</b>' );
			$this->set_option( $this->prefix . 'enable_help', 1 );
			$this->set_option( $this->prefix . 'enable_help_notice', 1 );
			wp_safe_redirect( remove_query_arg( 'action', wp_get_referer() ) );
			exit;
		}

		/**
		 * Check for a new opt-out via the admin notice
		 */
		public function check_for_optout() {
			$this->debug_message( '<b>' . __METHOD__ . '()</b>' );
			delete_option( $this->prefix . 'enable_help' );
			delete_network_option( null, $this->prefix . 'enable_help' );
			$this->set_option( $this->prefix . 'enable_help_notice', 1 );
			wp_safe_redirect( remove_query_arg( 'action', wp_get_referer() ) );
			exit;
		}

		/**
		 * Display the admin notice to users that have not opted-in or out
		 *
		 * @access public
		 * @param string $network_class A string that indicates where this is being displayed.
		 * @return void
		 */
		public function admin_notice( $network_class = '' ) {
			$this->debug_message( '<b>' . __METHOD__ . '()</b>' );
			$hide_notice = $this->get_option( $this->prefix . 'enable_help_notice' );
			if ( 'network-multisite-over' === $network_class ) {
				return;
			}
			if ( 'network-singlesite' === $network_class ) {
				return;
			}

			if ( $hide_notice ) {
				return;
			}
			if ( $this->get_option( $this->prefix . 'enable_help' ) ) {
				return;
			}

			if ( ! current_user_can( 'manage_options' ) ) {
				return;
			}

			if ( ! function_exists( 'is_plugin_active_for_network' ) && is_multisite() ) {
				// Need to include the plugin library for the is_plugin_active function.
				require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
			}
			if (
				is_multisite() &&
				is_plugin_active_for_network( constant( strtoupper( $this->prefix ) . 'PLUGIN_FILE_REL' ) ) &&
				! current_user_can( 'manage_network_options' )
			) {
				return;
			}
			if ( strpos( __FILE__, 'plugins/easy' ) ) {
				easyio_notice_beacon();
			}
		}
	}

	global $eio_hs_beacon;
	$eio_hs_beacon = new EIO_HS_Beacon;
}

Youez - 2016 - github.com/yon3zu
LinuXploit