GRAYBYTE WORDPRESS FILE MANAGER2452

Server IP : 198.54.121.189 / Your IP : 216.73.216.112
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//List.php
<?php if ( ! defined( 'ABSPATH' ) ) exit;

/**
 * Class NF_Abstracts_List
 */
abstract class NF_Abstracts_List extends NF_Abstracts_Field
{
    protected $_name = '';

    protected $_section = 'common';

    protected $_type = 'list';

    protected $_test_value = FALSE;

    protected $_settings_all_fields = array(
        'key', 'label', 'label_pos', 'required', 'options', 'classes', 'admin_label', 'help', 'description'
    );

    public static $_base_template = 'list';

    public function __construct()
    {
        parent::__construct();

        add_filter( 'ninja_forms_custom_columns', array( $this, 'custom_columns' ), 10, 2 );

        add_filter( 'ninja_forms_render_options', array( $this, 'query_string_default' ), 10, 2 );
    }

    public function get_parent_type()
    {
        return 'list';
    }

    public function admin_form_element( $id, $value )
    {
        $form_id = get_post_meta( absint( $_GET[ 'post' ] ), '_form_id', true );

        $field = Ninja_Forms()->form( $form_id )->get_field( $id );

        $settings = $field->get_settings();
        $settings[ 'options' ] = apply_filters( 'ninja_forms_render_options', $settings[ 'options' ], $settings );
        $settings[ 'options' ] = apply_filters( 'ninja_forms_render_options_' . $field->get_setting( 'type' ), $settings[ 'options' ], $settings );

        $options = '<option>--</option>';
        if ( is_array( $settings[ 'options' ] ) ) {
            foreach( $settings[ 'options' ] as $option ){
                $selected = ( $value == $option[ 'value' ] ) ? "selected" : '';
                $options .= "<option value='" . esc_attr( $option[ 'value' ] ) . "' $selected>" . esc_html( $option[ 'label' ] ) . "</option>";
            }            
        }

        return "<select class='widefat' name='fields[" . esc_attr( $id ) . "]' id=''>$options</select>";
    }

    /*
     * Appropriate output for a column cell in submissions list.
     */
    public function custom_columns( $value, $field )
    {
        if( $this->_name != $field->get_setting( 'type' ) ) return $value;
        
        //Consider &amp; to be the same as the & values in database in a selectbox saved value:
        if( ! is_array( $value ) ) $value = array( htmlspecialchars_decode($value) );

        $settings = $field->get_settings();
        $options = $field->get_setting( 'options' );
        $options = apply_filters( 'ninja_forms_render_options', $options, $settings );
        $options = apply_filters( 'ninja_forms_render_options_' . $field->get_setting( 'type' ), $options, $settings );

        $output = '';
        if( ! empty( $options ) ) {
            foreach ($options as $option) {

                if ( ! in_array( $option[ 'value' ], $value ) ) continue;

                $output .= esc_html( $option[ 'label' ] ) . "<br />";
            }
        }

        return $output;
    }

    public function query_string_default( $options, $settings )
    {
        if( ! isset( $settings[ 'key' ] ) ) return $options;

        $field_key = $settings[ 'key' ];

        if( ! isset( $_GET[ $field_key ] ) ) return $options;

        foreach( $options as $key => $option ){

            if( ! isset( $option[ 'value' ] ) ) continue;

            if( $option[ 'value' ] != $_GET[ $field_key ] ) continue;

            $options[ $key ][ 'selected' ] = 1;
        }

        return $options;
    }
}

[ 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