403Webshell
Server IP : 195.130.67.5  /  Your IP : 216.73.217.154
Web Server : Microsoft-IIS/10.0
System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586
User : IUSR ( 0)
PHP Version : 7.4.19
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/inetpub/wwwroot/stirizo/wp-content/plugins/widgetkit-pro/widgets/elements/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/inetpub/wwwroot/stirizo/wp-content/plugins/widgetkit-pro/widgets/elements/widget_list_layout.php
<?php
use Elementor\Widget_Base;
use Elementor\Controls_Manager;
use Elementor\Repeater;
use Elementor\Scheme_Color;
use Elementor\Group_Control_Typography;
Use Elementor\Core\Schemes\Typography;
use Elementor\Group_Control_Border;
use Elementor\Utils;

if (!defined('ABSPATH')) exit; // Exit if accessed directly
if(!function_exists('widgetkit_pro_array_get')) {
    function widgetkit_pro_array_get($array, $key, $default=null){
        if(!is_array($array)) return $default;
        return array_key_exists($key, $array) ? $array[$key] : $default;
    }
}

/**
 * magmax Layout
 * =============
 */
class Widgetkit_Pro_List_Layout extends Widget_Base
{
    public $all_settings = [];
    public static $a = [];

    public function get_name()
    {
        return 'magmax-list-layout';
    }

    public function get_title()
    {
        return __('List Layout', 'widgetkit-pro');
    }

    public function get_icon()
    {
        return 'eicon-post-list';
    }

    public function get_categories()
    {
        return ['widgetkit_pro'];
    }

    /**
     * A list of scripts that the widgets is depended in
     *
     * @since 1.3.0
     **/
    /*
        public function get_script_depends() {
            return [ 'imagesloaded' ];
        }
    */

    protected function _register_controls()
    {
        /**
         * Get all category list
         */
        $terms = get_terms( array(
            'taxonomy' => 'category',
            'hide_empty' => false,
        ) );
        $cat_names = array();
        foreach( $terms as $t ):
            $cat_names[$t->term_id] = $t->name;
        endforeach;



        $this->start_controls_section(
            'section_tab',
            [
                'label' => __('Layout', 'widgetkit-pro'),
                'class' => __('magmax-grid-layout', 'widgetkit-pro'),
            ]
        );
        $this->add_control(
            'layout_design',
            [
                'label' => __( 'Layout Design', 'widgetkit-pro' ),
                'type' => Controls_Manager::CHOOSE,
                'default' => '5',
                'options' => [
                    '1'    => [
                        'title' => __( '1', 'widgetkit-pro' ),
                        'icon' => 'eicon-counter',
                    ],
                    '2'    => [
                        'title' => __( '2', 'widgetkit-pro' ),
                        'icon' => 'icon-blocks',
                    ],
                    '3' => [
                        'title' => __( '3', 'widgetkit-pro' ),
                        'icon' => 'fa fa-align-center',
                    ],
                    '4' => [
                        'title' => __( '4', 'widgetkit-pro' ),
                        'icon' => 'fa fa-align-right',
                    ],
                    '5' => [
                        'title' => __( '5', 'widgetkit-pro' ),
                        'icon' => 'fa fa-align-right',
                    ],
                    '6' => [
                        'title' => __( '6', 'widgetkit-pro' ),
                        'icon' => 'fa fa-align-right',
                    ],
                    '7' => [
                        'title' => __( '7', 'widgetkit-pro' ),
                        'icon' => 'fa fa-align-right',
                    ],
                    '8' => [
                        'title' => __( '8', 'widgetkit-pro' ),
                        'icon' => 'fa fa-align-right',
                    ],
                    '9' => [
                        'title' => __( '9', 'widgetkit-pro' ),
                        'icon' => 'fa fa-align-right',
                    ],
                    '10' => [
                        'title' => __( '10', 'widgetkit-pro' ),
                        'icon' => 'fa fa-align-right',
                    ],
                    '11' => [
                        'title' => __( '11', 'widgetkit-pro' ),
                        'icon' => 'fa fa-align-right',
                    ],
                ],
            ]
        );
        $this->add_control(
            'cat_single_id',
            [
                'label' => __( 'Category List', 'widgetkit-pro' ),
                'type' => Controls_Manager::SELECT,
                'options' => $cat_names,
            ]
        );
        $this->add_control(
            'post_num_to_show',
            [
                'label'   => __( 'Number of Post to Show', 'widgetkit-pro' ),
                'type'    => Controls_Manager::NUMBER,
                'default' => 5,
                'min'     => -1,
                'max'     => 100,
                'step'    => 1,
            ]
        );
        $this->add_control(
            'show_cat_tag',
            [
                'label' => __( 'Category Tag for article', 'widgetkit-pro' ),
                'type' => Controls_Manager::SWITCHER,
                'default' => '',
                'description' => 'Show category tag for article above the title',
                'label_on' => __( 'Show', 'widgetkit-pro' ),
                'label_off' => __( 'Hide', 'widgetkit-pro' ),
                'return_value' => 'yes',
            ]
        );
        $this->add_control(
            'grid-gap',
            [
                'label' => __( 'Grid Gap', 'widgetkit-pro' ),
                'type' => Controls_Manager::SLIDER,
                'default' => [
                    'size' => 1,
                ],
                'range' => [
                    'px' => [
                        'min' => 0,
                        'max' => 30,
                        'step' => 1,
                    ],
                    '%' => [
                        'min' => 0,
                        'max' => 5,
                    ],
                ],
                'size_units' => [ 'px', '%' ],
                'selectors' => [
                    '{{WRAPPER}} .grid-layout .grid-layout-wrapper' => 'grid-gap: {{SIZE}}{{UNIT}};',
                ],
            ]
        );
        $this->add_control(
            'excerpt_word_count',
            [
                'label'   => __( 'Excerpt Word count', 'widgetkit-pro' ),
                'description' => 'Show excerpt word in the article',
                'type'    => Controls_Manager::NUMBER,
                'default' => 10,
                'min'     => 10,
                'max'     => 200,
                'step'    => 1,
            ]
        );
        $this->add_control(
            'show_full_article_link',
            [
                'label' => __( 'Show full article link', 'widgetkit-pro' ),
                'type' => Controls_Manager::SWITCHER,
                'default' => '',
                'description' => 'Show full article link in the bottom of the card',
                'label_on' => __( 'Show', 'widgetkit-pro' ),
                'label_off' => __( 'Hide', 'widgetkit-pro' ),
                'return_value' => 'yes',
            ]
        );

        $this->end_controls_section();


        /**
         * Style tab
         * =============
         */
        $this->start_controls_section(
            'section_style',
            [
                'label' => __( 'Typography', 'widgetkit-pro' ),
                'tab' => Controls_Manager::TAB_STYLE,
            ]
        );
        $this->add_control(
            'section_title',
            [
                'label' => __( 'Section Title', 'widgetkit-pro' ),
                'type' => Controls_Manager::HEADING,
                'separator' => 'before',
            ]
        );
        $this->add_group_control(
            Group_Control_Typography::get_type(),
            [
                'label' => __( 'Section Title', 'widgetkit-pro' ),
                'name' => 'section_title_typography',
                'selector' => '{{WRAPPER}} .layout-title h3',
            ]
        );
        $this->add_control(
            'highlight_title',
            [
                'label' => __( 'Highlight Post Title', 'widgetkit-pro' ),
                'type' => Controls_Manager::HEADING,
                'separator' => 'before',
            ]
        );
        $this->add_group_control(
            Group_Control_Typography::get_type(),
            [
                'label' => __( 'Highlight Post Title', 'widgetkit-pro' ),
                'name' => 'highlight_post_title_typography',
                'selector' => '{{WRAPPER}} .grid-layout .grid-6-wrapper .single-column:nth-of-type(3) .post-title h3, 
                {{wrapper}} .grid-layout .grid-1-wrapper .single-column:first-child .post-title h3, 
                {{WRAPPER}} .grid-layout .grid-1-wrapper .single-column:nth-of-type(4) .post-title h3, 
                {{WRAPPER}} .grid-layout .grid-2-wrapper .single-column:first-child .post-title h3, 
                {{WRAPPER}} .grid-layout .grid-2-wrapper .single-column:nth-of-type(6) .post-title h3, 
                {{WRAPPER}} .grid-layout .grid-3-wrapper .single-column:nth-of-type(3) .post-title h3, 
                {{WRAPPER}} .grid-layout .grid-3-wrapper .single-column:nth-of-type(6) .post-title h3, 
                {{WRAPPER}} .grid-layout .grid-4-wrapper .single-column:nth-of-type(1) .post-title h3, 
                {{WRAPPER}} .grid-layout .grid-4-wrapper .single-column:nth-of-type(4) .post-title h3, 
                {{WRAPPER}} .grid-layout .grid-5-wrapper .single-column:nth-of-type(1) .post-title h3,
                {{WRAPPER}} .grid-layout .grid-6-wrapper .single-column:nth-of-type(3) .post-title h3,
                {{WRAPPER}} .grid-layout .grid-7-wrapper .single-column:nth-of-type(1) .post-title h3, 
                {{WRAPPER}} .grid-layout .grid-8-wrapper .single-column:nth-of-type(1) .post-title h3, 
                {{WRAPPER}} .grid-layout .grid-8-wrapper .single-column:nth-of-type(2) .post-title h3, 
                {{WRAPPER}} .grid-layout .grid-9-wrapper .single-column:nth-of-type(1) .post-title h3, 
                
                {{WRAPPER}} .grid-layout .grid-10-wrapper .single-column:nth-of-type(3) .post-title h3',

            ]
        );

        $this->end_controls_section();


        $this->start_controls_section(
            'content_style',
            [
                'label' => __( 'Content', 'widgetkit-pro' ),
                'tab' => Controls_Manager::TAB_STYLE,
            ]
        );
        $this->add_control(
            'custom_color',
            [
                'label' => __( 'Custom Color', 'widgetkit-pro' ),
                'type' => Controls_Manager::SWITCHER,
                'default' => '',
                'description' => 'Show custom color for content',
                'label_on' => __( 'Yes', 'widgetkit-pro' ),
                'label_off' => __( 'No', 'widgetkit-pro' ),
                'return_value' => 'yes',
            ]
        );
        $this->add_control(
            'title_color',
            [
                'label' => __( 'Title Color', 'widgetkit-pro' ),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .highlight-post-title h3, .regular-post-title h3' => 'color: {{VALUE}}',
                ],
                'condition' => [
                    'custom_color' => 'yes',
                ],
            ]
        );
        $this->add_control(
            'meta_color',
            [
                'label' => __( 'Meta Color', 'widgetkit-pro' ),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .post-author, .post-date' => 'color: {{VALUE}}',
                ],
                'condition' => [
                    'custom_color' => 'yes',
                ],
            ]
        );
        $this->add_control(
            'content_color',
            [
                'label' => __( 'Content Color', 'widgetkit-pro' ),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .cat-post-list .post-excerpt' => 'color: {{VALUE}}',
                ],
                'condition' => [
                    'custom_color' => 'yes',
                ],
            ]
        );
        $this->end_controls_section();



        $this->start_controls_section(
            'link_style',
            [
                'label' => __( 'Link', 'widgetkit-pro' ),
                'tab' => Controls_Manager::TAB_STYLE,
            ]
        );
        $this->add_control(
            'link_border_color',
            [
                'label' => __( 'Link Border Color', 'widgetkit-pro' ),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .single-post-link a:after' => 'background-color: {{VALUE}}',
                ],
            ]
        );
        $this->end_controls_section();

    }


    protected function render()
    {
        $settings = $this->get_settings();
        $layout_header_enable = widgetkit_pro_array_get($settings, 'layout_header_enable');
        $show_cat_tag = widgetkit_pro_array_get($settings, 'show_cat_tag');
        $layout_title = widgetkit_pro_array_get($settings, 'layout_title');
        $cat_single_id = widgetkit_pro_array_get($settings, 'cat_single_id');
        $post_num_to_show = widgetkit_pro_array_get($settings, 'post_num_to_show');
        $selected_layout = widgetkit_pro_array_get($settings, 'layout_design');
        $excerpt_word_count = widgetkit_pro_array_get($settings, 'excerpt_word_count');
        $full_article_link = widgetkit_pro_array_get($settings, 'show_full_article_link');
        /**
         * term meta value
         * ================
         */
        $tax_term = get_term_meta($cat_single_id);
        // $tax_image = widgetkit_pro_array_get($tax_term, 'magmax_tax_image')[0];
        // $tax_tag_bg_color = widgetkit_pro_array_get($tax_term, 'magmax_tax_tag_bg_color')[0];

    ?>
        <div id="dynamic-category-content">
            <?php
            include( plugin_dir_path( dirname(__FILE__) ) . 'layout/grid/grid-'.$selected_layout.'.php');
            ?>
        </div>
    <?php
    }
    protected function _content_template()
    {
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit