GRAYBYTE WORDPRESS FILE MANAGER3301

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/giriqfky/trustyourlawyer.com/wp-content/plugins/ninja-forms/includes/Abstracts/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/giriqfky/trustyourlawyer.com/wp-content/plugins/ninja-forms/includes/Abstracts//Field.php
<?php if ( ! defined( 'ABSPATH' ) ) exit;

/**
 * Class NF_Abstracts_Field
 */
abstract class NF_Abstracts_Field extends NF_Abstracts_Element
{
    /**
    * @var string
    */
    protected $_name  = '';

    /**
     * @var string
     */
    protected $_nicename = '';

    /**
    * @var string
    */
    protected $_section = '';

    /**
    * @var string
    */
    protected $_icon = 'square-o';

    /**
     * @var array
     */
    protected $_aliases = array();

    /**
     * @var array
     */
    protected $_settings = array();

    /**
     * @var array
     */
    protected $_settings_all_fields = array();

    /**
     * @var array
     */
    protected $_settings_exclude = array();

    /**
     * @var array
     */
    protected $_settings_only = array();

    /**
     * @var array
     */
    protected $_use_merge_tags = array( 'user', 'post', 'system', 'fields' );

    /**
     * @var array
     */
    protected $_use_merge_tags_include = array();

    /**
     * @var array
     */
    protected $_use_merge_tags_exclude = array();

    /**
     * @var string
     */
    protected $_test_value = 'test';

    /**
     * @var string
     */
    protected $_attr = '';

    /**
     * @var string
     */
    protected $_type = '';

    /**
     * @var string
     */
    protected $_parent_type = '';

    /**
     * @var string
     */
    public static $_base_template = 'input';

    /**
     * @var array
     */
    protected $_templates = array();

    /**
     * @var string
     */
    protected $_wrap_template = 'wrap';

    /**
     * @var array
     */
    protected $_old_classname = '';

	/**
	 * @var bool
	 */
    protected $_show_in_builder = true;

    //-----------------------------------------------------
    // Public Methods
    //-----------------------------------------------------

    /**
     * Constructor
     */
    public function __construct()
    {
        if( ! empty( $this->_settings_only ) ){

            $this->_settings = array_merge( $this->_settings, $this->_settings_only );
        } else {

            $this->_settings = array_merge( $this->_settings_all_fields, $this->_settings );
            $this->_settings = array_diff( $this->_settings, $this->_settings_exclude );
        }

        $this->_settings = $this->load_settings( $this->_settings );

        $this->_test_value = apply_filters( 'ninja_forms_field_' . $this->_name . '_test_value', $this->_test_value );

        add_filter( 'ninja_forms_localize_field_settings_' . $this->_type, array( $this, 'localize_settings' ), 10, 2 );
    }

    /**
     * Validate
     *
     * @param $field
     * @param $data
     * @return array $errors
     */
    public function validate( $field, $data )
    {
        $errors = array();
        // Required check.

        if( is_array( $field[ 'value' ] ) && "repeater" !== $field[ 'type' ] ){
            $field[ 'value' ] = implode( '', $field[ 'value' ] );
        }

        if( isset( $field['required'] ) && 1 == intval( $field['required'] ) ) {
            $val = trim( $field['value'] );
            if( empty( $val ) && '0' !== $val ){
                $errors['slug'] = 'required-error';
                $errors['message'] = esc_html__('This field is required.', 'ninja-forms');
            }
        }
        return $errors;
    }

    public function process( $field, $data )
    {
        return $data;
    }

    /**
     * Admin Form Element
     *
     * Returns the output for editing fields in a submission.
     *
     * @param $id
     * @param $value
     * @return string
     */
    public function admin_form_element( $id, $value )
    {
        return '<input class="widefat" name="fields[' . absint( $id ) . ']" value="' . esc_attr( $value ) . '" type="text" />';
    }

    public function get_name()
    {
        return $this->_name;
    }

    public function get_nicename()
    {
        return $this->_nicename;
    }

    public function get_section()
    {
        return $this->_section;
    }

    public function get_icon()
    {
        return $this->_icon;
    }

    public function get_aliases()
    {
        return $this->_aliases;
    }

    public function get_type()
    {
        return $this->_type;
    }

    public function get_parent_type()
    {
        if( $this->_parent_type ){
            return $this->_parent_type;
        }

        // If a type is not set, return 'textbox'
        return ( get_parent_class(self::class) && isset ( parent::$_type ) ) ? parent::$_type : 'textbox';
    }

    public function get_settings()
    {
        return $this->_settings;
    }

    public function use_merge_tags()
    {
        $use_merge_tags = array_merge( $this->_use_merge_tags, $this->_use_merge_tags_include );
        $use_merge_tags = array_diff( $use_merge_tags, $this->_use_merge_tags_exclude );

        return $use_merge_tags;
    }

    public function get_test_value()
    {
        return $this->_test_value;
    }

    public function get_templates()
    {
        $templates = (array) $this->_templates;

        // Create a reflection for examining the parent
        $reflection = new ReflectionClass( $this );
        $parent_class = $reflection->getParentClass();

        if ( $parent_class->isAbstract() ) {

            $parent_class_name = $parent_class->getName();
            $parent_templates = call_user_func( array( $parent_class_name, 'get_base_template' ) ); // Parent Class' Static Property
            return array_merge( $templates, (array) $parent_templates );
        }

        $parent_class_name = strtolower( str_replace('NF_Fields_', '', $parent_class->getName() ) );

        if( ! isset( Ninja_Forms()->fields[ $parent_class_name ] ) ) return $templates;

        $parent = Ninja_Forms()->fields[ $parent_class_name ];
        return array_merge($templates, $parent->get_templates());

    }

    public function get_wrap_template()
    {
        return $this->_wrap_template;
    }

    public function get_old_classname()
    {
        return $this->_old_classname;
    }

    public function show_in_builder() {
	    return $this->_show_in_builder;
    }

    protected function load_settings( $only_settings = array() )
    {
        $settings = array();

        // Loads a settings array from the FieldSettings configuration file.
        $all_settings = Ninja_Forms::config( 'FieldSettings' );

        foreach( $only_settings as $setting ){

            if( isset( $all_settings[ $setting ]) ){

                $settings[ $setting ] = $all_settings[ $setting ];
            }
        }

        return $settings = apply_filters( 'ninja_forms_field_load_settings', $settings, $this->_name, $this->get_parent_type() );
    }

    public static function get_base_template()
    {
        return self::$_base_template;
    }

    public static function sort_by_order( $a, $b )
    {
        return $a->get_setting( 'order' ) - $b->get_setting( 'order' );
    }

    public function localize_settings( $settings, $form_id ) {
        return $settings;
    }

}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 10 2025 04:32:23
giriqfky / giriqfky
0755
.htaccess
0.41 KB
July 10 2025 04:32:23
giriqfky / giriqfky
0644
Action.php
5.331 KB
July 09 2024 21:34:32
giriqfky / giriqfky
0644
ActionNewsletter.php
4.452 KB
February 04 2020 21:17:42
giriqfky / giriqfky
0644
BatchProcess.php
5.563 KB
June 15 2022 07:30:14
giriqfky / giriqfky
0644
Controller.php
1.605 KB
April 05 2018 22:28:06
giriqfky / giriqfky
0644
Element.php
0.118 KB
August 25 2020 22:28:06
giriqfky / giriqfky
0644
Extension.php
3.077 KB
March 14 2016 18:30:08
giriqfky / giriqfky
0644
Field.php
6.882 KB
February 12 2024 22:23:38
giriqfky / giriqfky
0644
FieldOptIn.php
2.289 KB
February 04 2020 21:17:42
giriqfky / giriqfky
0644
Input.php
0.621 KB
May 02 2017 19:42:16
giriqfky / giriqfky
0644
List.php
3.313 KB
August 12 2019 18:00:44
giriqfky / giriqfky
0644
LogLevel.php
0.354 KB
June 21 2017 21:56:02
giriqfky / giriqfky
0644
Logger.php
3.151 KB
June 21 2017 21:56:02
giriqfky / giriqfky
0644
LoggerInterface.php
2.846 KB
June 21 2017 21:56:02
giriqfky / giriqfky
0644
Menu.php
2.351 KB
May 02 2017 19:42:16
giriqfky / giriqfky
0644
MergeTags.php
5.728 KB
April 02 2025 18:14:40
giriqfky / giriqfky
0644
Metabox.php
1.763 KB
December 09 2024 19:37:34
giriqfky / giriqfky
0644
Migration.php
4.521 KB
February 05 2019 21:29:12
giriqfky / giriqfky
0644
Model.php
22.841 KB
March 12 2025 21:40:36
giriqfky / giriqfky
0644
ModelFactory.php
14.163 KB
June 07 2021 21:40:12
giriqfky / giriqfky
0644
PaymentGateway.php
0.878 KB
March 14 2016 18:30:08
giriqfky / giriqfky
0644
RequiredUpdate.php
6.038 KB
January 14 2019 22:58:06
giriqfky / giriqfky
0644
Routes.php
0.38 KB
October 11 2021 19:04:16
giriqfky / giriqfky
0644
SotAction.php
3.429 KB
December 09 2024 19:37:34
giriqfky / giriqfky
0644
SotActionNewsletter.php
4.487 KB
December 09 2024 19:37:34
giriqfky / giriqfky
0644
Submenu.php
2.73 KB
September 18 2020 19:17:16
giriqfky / giriqfky
0644
SubmissionHandler.php
4.265 KB
November 15 2021 22:31:24
giriqfky / giriqfky
0644
SubmissionMetabox.php
1.002 KB
December 09 2024 19:37:34
giriqfky / giriqfky
0644
UserInfo.php
1.307 KB
February 04 2020 21:17:42
giriqfky / giriqfky
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF