403Webshell
Server IP : 146.190.157.162  /  Your IP : 216.73.217.6
Web Server : Apache
System : Linux ubuntu-s-2vcpu-4gb-amd-sfo3-01-KIT-DIGITAL 6.5.0-44-generic #44-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 7 15:10:09 UTC 2024 x86_64
User : businessweek ( 639)
PHP Version : 8.2.10-2ubuntu2.2
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_signal,pcntl_signal_dispatch,pcntl_getpriority,pcntl_setpriority,dl,putenv,parse_ini_file,show_source
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/html/reformas/wp-content/plugins/zero-spam/modules/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/reformas/wp-content/plugins/zero-spam/modules/class-debug.php
<?php
/**
 * Debug class
 *
 * @package ZeroSpam
 */

namespace ZeroSpam\Modules;

// Security Note: Blocks direct access to the plugin PHP files.
defined( 'ABSPATH' ) || die();

/**
 * Debug admin module
 */
class Debug {
	/**
	 * Constructor
	 */
	public function __construct() {
		add_action( 'init', array( $this, 'init' ), -1 );
	}

	/**
	 * Fires after WordPress has finished loading but before any headers are sent.
	 */
	public function init() {
		add_filter( 'zerospam_setting_sections', array( $this, 'sections' ) );
		add_filter( 'zerospam_settings', array( $this, 'settings' ), 10, 1 );
		add_filter( 'zerospam_get_ip', array( $this, 'debug_ip' ), 10, 1 );
	}

	/**
	 * Updates the visitor IP to the debug IP
	 *
	 * @param string $ip IP address.
	 */
	public function debug_ip( $ip ) {
		$debug_ip = \ZeroSpam\Core\Settings::get_settings( 'debug_ip' );

		if (
			'enabled' === \ZeroSpam\Core\Settings::get_settings( 'debug' ) &&
			! empty( $debug_ip )
		) {
			return $debug_ip;
		}

		return $ip;
	}

	/**
	 * Admin setting sections
	 *
	 * @param array $sections Array of admin setting sections.
	 */
	public function sections( $sections ) {
		$sections['debug'] = array(
			'title' => __( 'Debug', 'zero-spam' ),
			'icon'  => 'assets/img/icon-bug.svg',
		);

		return $sections;
	}

	/**
	 * Admin settings
	 *
	 * @param array $settings Array of available settings.
	 */
	public function settings( $settings ) {
		$options = get_option( 'zero-spam-debug' );

		$settings['debug'] = array(
			'title'   => __( 'Debug', 'zero-spam' ),
			'desc'    => __( 'When enabled, provides verbose logging & allows the site admin to test an IP address access.', 'zero-spam' ),
			'section' => 'debug',
			'module'  => 'debug',
			'type'    => 'checkbox',
			'options' => array(
				'enabled' => false,
			),
			'value'   => ! empty( $options['debug'] ) ? $options['debug'] : false,
		);

		$settings['debug_ip'] = array(
			'title'       => __( 'Debug IP', 'zero-spam' ),
			'desc'        => wp_kses(
				/* translators: %s: url */
				__( 'Mock an IP address for debugging. This overrides all visitor IP addresses and <strong>while enabled could block legit visitors from accessing the site</strong>.', 'zero-spam' ),
				array(
					'strong' => array(),
				)
			),
			'section'     => 'debug',
			'module'      => 'debug',
			'type'        => 'text',
			'placeholder' => '127.0.0.1',
			'value'       => ! empty( $options['debug_ip'] ) ? $options['debug_ip'] : false,
		);

		return $settings;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit