403Webshell
Server IP : 149.28.60.191  /  Your IP : 216.73.217.128
Web Server : nginx/1.31.1
System : Linux vultr.guest 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : mda ( )
PHP Version : 7.4.33
Disable Function : getmyuid,passthru,leak,listen,diskfreespace,tmpfile,link,shell_exec,dl,exec,system,highlight_file,source,show_source,fpassthru,virtual,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix_getppid,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,proc_open,proc_close,proc_nice,proc_terminate,escapeshellcmd,ini_alter,popen,pcntl_exec,socket_accept,socket_bind,socket_clear_error,socket_close,socket_connect,symlink,posix_geteuid,ini_alter,socket_listen,socket_create_listen,socket_read,socket_create_pair,stream_socket_server
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/mda/webapps/mda-restore/wp-content/themes/Avada/includes/upgrade/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/mda/webapps/mda-restore/wp-content/themes/Avada/includes/upgrade/class-avada-upgrade-710.php
<?php
/**
 * Upgrades Handler.
 *
 * @author     ThemeFusion
 * @copyright  (c) Copyright by ThemeFusion
 * @link       https://theme-fusion.com
 * @package    Avada
 * @subpackage Core
 */

// Do not allow directly accessing this file.
if ( ! defined( 'ABSPATH' ) ) {
	exit( 'Direct script access denied.' );
}

/**
 * Handle migrations for Avada 7.1.
 *
 * @since 7.1
 */
class Avada_Upgrade_710 extends Avada_Upgrade_Abstract {

	/**
	 * The version.
	 *
	 * @access protected
	 * @since 7.1
	 * @var string
	 */
	protected $version = '7.1.0';

	/**
	 * An array of all available languages.
	 *
	 * @static
	 * @access private
	 * @since 7.1
	 * @var array
	 */
	private static $available_languages = [];

	/**
	 * The actual migration process.
	 *
	 * @access protected
	 * @since 7.1
	 * @return void
	 */
	protected function migration_process() {
		$available_languages       = Fusion_Multilingual::get_available_languages();
		self::$available_languages = ( ! empty( $available_languages ) ) ? $available_languages : [ '' ];

		$this->migrate_options();
	}

	/**
	 * Migrate options.
	 *
	 * @since 7.1
	 * @access protected
	 */
	protected function migrate_options() {
		$available_langs = self::$available_languages;

		$options = get_option( $this->option_name, [] );
		$options = $this->enable_avada_forms( $options );
		$options = $this->migrate_lazy_load( $options );
		$options = $this->migrate_form_border( $options );

		update_option( $this->option_name, $options );

		foreach ( $available_langs as $language ) {

			// Skip langs that are already done.
			if ( '' === $language ) {
				continue;
			}

			$options = get_option( $this->option_name . '_' . $language, [] );
			$options = $this->enable_avada_forms( $options );
			$options = $this->migrate_lazy_load( $options );
			$options = $this->migrate_form_border( $options );

			update_option( $this->option_name . '_' . $language, $options );
		}
	}

	/**
	 * Sets Avada Forms Status.
	 *
	 * @access private
	 * @since 7.1
	 * @param array $options The Global Options array.
	 * @return array         The updated Global Options array.
	 */
	private function enable_avada_forms( $options ) {
		$options['status_fusion_forms'] = '1';

		return $options;
	}

	/**
	 * Migrates the lazy load option.
	 *
	 * @access private
	 * @since 7.1
	 * @param array $options The Global Options array.
	 * @return array         The updated Global Options array.
	 */
	private function migrate_lazy_load( $options ) {

		if ( isset( $options['lazy_load'] ) ) {
			if ( '1' === $options['lazy_load'] ) {
				$options['lazy_load'] = 'avada';
			} else {
				$options['lazy_load'] = 'none';
			}
		}

		return $options;
	}

	/**
	 * Migrates the form border width option.
	 *
	 * @access private
	 * @since 7.1
	 * @param array $options The Global Options array.
	 * @return array         The updated Global Options array.
	 */
	private function migrate_form_border( $options ) {

		if ( isset( $options['form_border_width'] ) ) {
			$value = ( (int) $options['form_border_width'] ) . 'px';

			$options['form_border_width'] = [
				'top'    => $value,
				'right'  => $value,
				'bottom' => $value,
				'left'   => $value,
			];
		}

		return $options;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit