403Webshell
Server IP : 38.190.208.107  /  Your IP : 216.73.216.187
Web Server : nginx/1.28.1
System : Linux ht2026040333114 6.1.0-10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.37-1 (2023-07-03) x86_64
User : root ( 0)
PHP Version : 8.2.28
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv,eval,assert,passthru,system,exec,shell_exec,popen,proc_open
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /www/wwwroot/wp.9/wp-content/themes/dt-the7/inc/mods/legacy/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/wp.9/wp-content/themes/dt-the7/inc/mods/legacy/legacy.php
<?php
/**
 * Legacy module.
 */

defined( 'ABSPATH' ) || exit;

if ( ! class_exists( 'Presscore_Modules_Legacy' ) ) :

	class Presscore_Modules_Legacy {

		/**
		 * Legacy settings ids.
		 *
		 * @var array
		 */
		static $settings = array();

		/**
		 * Execute module.
		 */
		public static function execute() {
			self::$settings = array(
				'rows',
				'admin-icons-bar',
			    'overlapping-headers',
			    'deprecated_mega_menu_settings',
			);

			if ( dt_the7_core_is_enabled() ) {
				self::$settings = array_merge( self::$settings, array(
					'benefits',
					'logos',
					'portfolio-layout',
				) ) ;
			}

			self::handle_legacy_code();
		}

		/**
		 * Handle legacy code hideout.
		 */
		public static function handle_legacy_code() {
			foreach ( self::$settings as $id ) {
				if ( The7_Admin_Dashboard_Settings::get( $id ) ) {
					continue;
				}

				$file_name = __DIR__ . "/legacy-{$id}.php";
				if ( file_exists( $file_name ) ) {
					include $file_name;
				}

				$class_name = self::get_class_name( $id );

				if ( class_exists( $class_name ) && is_callable( array( $class_name, 'launch' ) ) ) {
					call_user_func( array( $class_name, 'launch' ) );
				}
			}
		}

		/**
		 * Prepare legacy handler class name.
		 *
		 * @param string $id
		 *
		 * @return string
		 */
		protected static function get_class_name( $id ) {
			$class_name = 'Presscore_Modules_Legacy_';
			$class_name .= implode( '_', array_map( array( __CLASS__, 'sanitize_handler_class_name' ), explode( '-', $id ) ) );

			return $class_name;
		}

		/**
		 * Sanitize class name part.
		 *
		 * @param string $name
		 *
		 * @return string
		 */
		public static function sanitize_handler_class_name( $name ) {
			return ucfirst( strtolower( $name ) );
		}

		/**
		 * Returns true if legacy mode is active.
		 *
		 * @return bool
		 */
		public static function is_legacy_mode_active() {
			// Do not count icons-bar.
			$settings = array_diff( self::$settings, array( 'admin-icons-bar' ) );

			foreach ( $settings as $id ) {
				if ( The7_Admin_Dashboard_Settings::get( $id ) ) {
					return true;
				}
			}

			return false;
		}
	}

	Presscore_Modules_Legacy::execute();

endif;

Youez - 2016 - github.com/yon3zu
LinuXploit