403Webshell
Server IP : 199.250.200.62  /  Your IP : 216.73.217.89
Web Server : Apache
System : Linux vps37394.inmotionhosting.com 3.10.0-1160.119.1.vz7.224.4 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
User : jasonp18 ( 1000)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /home/jasonp18/www/wp-content/plugins/formidable-pro/classes/models/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/jasonp18/www/wp-content/plugins/formidable-pro/classes/models/FrmProFieldOption.php
<?php

if ( ! defined( 'ABSPATH' ) ) {
	die( 'You are not allowed to call this page directly.' );
}

/**
 * @since 2.03.05
 */
class FrmProFieldOption extends FrmFieldOption {

	/**
	 * @var bool
	 *
	 * @since 2.03.05
	 */
	private $use_key = false;

	/**
	 * @var bool
	 *
	 * @since 2.03.05
	 */
	private $use_separate_values = false;

	/**
	 * FrmProFieldOption constructor.
	 *
	 * @param string|int $option_key
	 * @param string|array $option
	 * @param array $args
	 */
	public function __construct( $option_key, $option, $args ) {
		$this->set_use_key( $args );
		$this->set_use_separate_values( $args );

		parent::__construct( $option_key, $option, $args );
	}

	/**
	 * Set the use_key property
	 *
	 * @since 2.03.05
	 *
	 * @param array $args
	 */
	private function set_use_key( $args ) {
		if ( isset( $args['use_key'] ) ) {
			$this->use_key = (bool) $args['use_key'];
		}
	}

	/**
	 * Set the use_separate_values property
	 *
	 * @since 2.03.05
	 *
	 * @param array $args
	 */
	private function set_use_separate_values( $args ) {
		if ( isset( $args['use_separate_values'] ) ) {
			$this->use_separate_values = (bool) $args['use_separate_values'];
		}
	}

	/**
	 * Set the saved_value property
	 *
	 * @since 2.03.05
	 */
	protected function set_saved_value() {
		if ( $this->use_key ) {
			$this->saved_value = $this->option_key;
		} else if ( is_array( $this->option ) ) {
			if ( $this->use_separate_values && isset( $this->option['value'] ) ) {
				$this->saved_value = $this->option['value'];
			} else {
				$this->saved_value = isset( $this->option['label'] ) ? $this->option['label'] : reset( $this->option );
			}
		} else {
			$this->saved_value = $this->option;
		}
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit