Sid Gifari File Manager
🏠 Root
/
home
/
ailwtbdh
/
lynchestinegroup.com
/
wp-content
/
plugins
/
koncrete-core_2
/
elementor
/
radius-post
/
Editing: class.php
<?php /** * @author RadiusTheme * @since 1.0 * @version 1.0 */ namespace radiustheme\Koncrete_Core; use Elementor\Controls_Manager; use Elementor\Group_Control_Background; use Elementor\Group_Control_Typography; if ( ! defined( 'ABSPATH' ) ) exit; class Radius_Post extends Custom_Widget_Base { public function __construct( $data = array(), $args = null ){ $this->rt_name = esc_html__( 'Post Gallery', 'koncrete-core' ); $this->rt_base = 'rt-radius-post'; $this->rt_translate = array( 'cols' => array( '12' => esc_html__( '1 Col', 'koncrete-core' ), '6' => esc_html__( '2 Col', 'koncrete-core' ), '4' => esc_html__( '3 Col', 'koncrete-core' ), '3' => esc_html__( '4 Col', 'koncrete-core' ), '2' => esc_html__( '6 Col', 'koncrete-core' ), ), 'cols_slider' => array( '1' => esc_html__( '1 Col', 'koncrete-core' ), '2' => esc_html__( '2 Col', 'koncrete-core' ), '3' => esc_html__( '3 Col', 'koncrete-core' ), '4' => esc_html__( '4 Col', 'koncrete-core' ), '5' => esc_html__( '5 Col', 'koncrete-core' ), '6' => esc_html__( '6 Col', 'koncrete-core' ), ), ); parent::__construct( $data, $args ); } private function rt_load_scripts(){ wp_enqueue_style( 'owl-carousel' ); wp_enqueue_style( 'owl-theme-default' ); wp_enqueue_script( 'owl-carousel' ); } private function rt_cat_dropdown() { $categories = get_categories(); foreach ( $categories as $category ) { $category_dropdown[$category->term_id] = $category->name; } return $category_dropdown; } public function rt_fields(){ $categories = get_categories(); $category_dropdown = array( '0' => esc_html__( 'All Categories', 'koncrete-core' ) ); foreach ( $categories as $category ) { $category_dropdown[$category->term_id] = $category->name; } $default_category_id = array_rand($category_dropdown); $posts = get_posts( array( 'posts_per_page' => -1, 'orderby' => 'title','order' => 'ASC','post_status' => 'publish','suppress_filters' => false ) ); $posts_dropdown = array(); foreach ( $posts as $post ) { $posts_dropdown[$post->ID] = $post->post_title; } if ($posts_dropdown) { $default_post_id_1 = array_rand($posts_dropdown); $default_post_id_2 = array_rand($posts_dropdown); $default_post_id_3 = array_rand($posts_dropdown); } else { $default_post_id_1 = 0; $default_post_id_2 = 0; $default_post_id_3 = 0; } $fields = array( array( 'mode' => 'section_start', 'id' => 'sec_general', 'label' => esc_html__( 'General', 'koncrete-core' ), ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'style', 'label' => esc_html__( 'Layout Style', 'koncrete-core' ), 'options' => array( 'style1' => esc_html__( 'style 1', 'koncrete-core' ), 'style2' => esc_html__( 'style 2', 'koncrete-core' ), 'style3' => esc_html__( 'style 3 (slider)', 'koncrete-core' ), 'style4' => esc_html__( 'style 4', 'koncrete-core' ), 'style5' => esc_html__( 'style 5', 'koncrete-core' ), ), 'default' => 'style1', ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'which_post', 'condition' => array( 'style' => array( 'style4' ) ), 'label' => esc_html__( 'Which type of post you want to display', 'koncrete-core' ), 'options' => array( 'recent_post' => esc_html__( 'Recent Posts', 'koncrete-core' ), 'custom_select' => esc_html__( 'Custom Select', 'koncrete-core' ), ), 'default' => 'recent_post', ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'cat', 'label' => esc_html__( 'Select Category', 'koncrete-core' ), 'options' => $category_dropdown, 'condition' => array( 'style' => array( 'stylenot-fallback') ), 'default' => 0, ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'multiple_category', 'label' => __( 'Categories', 'koncrete-core' ), 'options' => $this->rt_cat_dropdown(), 'multiple' => true, 'description' => esc_html__( 'All categories is selected by default', 'koncrete-core' ), 'condition' => array( 'style' => array( 'style1', 'style2', 'style3', 'style5', ) ), ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'cat_view_4', 'label' => esc_html__( 'Select Category for Recent post', 'koncrete-core' ), 'options' => $this->rt_cat_dropdown(), 'multiple' => true, 'description' => "Make sure Category has at least 3 posts", 'condition' => array( 'style' => 'style4', 'which_post' => 'recent_post' ), 'default' => 0, ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'first_post', 'label' => esc_html__( 'First Post', 'koncrete-core' ), 'options' => $posts_dropdown, 'default' => $default_post_id_1, 'condition' => array( 'style' => 'style4', 'which_post' => 'custom_select' ), ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'second_post', 'label' => esc_html__( 'Second Post', 'koncrete-core' ), 'options' => $posts_dropdown, 'default' => $default_post_id_2, 'condition' => array( 'style' => 'style4', 'which_post' => 'custom_select' ), ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'third_post', 'default' => $default_post_id_3, 'label' => esc_html__( 'Third Post', 'koncrete-core' ), 'options' => $posts_dropdown, 'condition' => array( 'style' => 'style4', 'which_post' => 'custom_select' ), ), array( 'type' => Controls_Manager::NUMBER, 'id' => 'posts_per_page', 'condition' => array( 'style' => array( 'style1', 'style2', 'style3', 'style5', ) ), 'label' => esc_html__( 'Posts Per Page', 'koncrete-core' ), 'default' => '3', ), array( 'type' => Controls_Manager::SWITCHER, 'id' => 'pagination_display', 'label_on' => esc_html__( 'Show', 'koncrete-core' ), 'label_off' => esc_html__( 'Hide', 'koncrete-core' ), 'label' => esc_html__( 'Show Pagination', 'koncrete-core' ), 'default' => "no", 'condition' => array( 'style' => array( 'style1', 'style2', 'style5' ) ), ), array( 'type' => Controls_Manager::NUMBER, 'id' => 'no_of_excerpt_words_for_first_post', 'label' => esc_html__( 'First Post Excerpt number', 'koncrete-core' ), 'default' => '14', 'condition' => array( 'style' => array( 'style4' ) ), ), array( 'type' => Controls_Manager::NUMBER, 'id' => 'no_of_excerpt_words', 'label' => esc_html__( 'Number Of words for excerpt', 'koncrete-core' ), 'default' => '14', 'condition' => array( 'style' => array( 'style1', 'style3', 'style4', 'style5', ) ), ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'orderby', 'label' => esc_html__( 'Order By', 'koncrete-core' ), 'condition' => array( 'style' => array( 'style1', 'style2', 'style3', 'style5', ) ), 'options' => array( 'date' => esc_html__( 'Date (Recents comes first)', 'koncrete-core' ), 'title' => esc_html__( 'Title', 'koncrete-core' ), 'menu_order' => esc_html__( 'Custom Order (Available via Order field inside Page Attributes box)', 'koncrete-core' ), ), 'default' => 'date', ), array( 'mode' => 'section_end', ), // Responsive Columns for general // it will generate bootstrap column array( 'mode' => 'section_start', 'condition' => array( 'style' => array( 'style1', 'style2', 'style5' ) ), 'id' => 'sec_responsive', 'label' => esc_html__( 'Number of Responsive Columns', 'koncrete-core' ), ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'col_lg', 'label' => esc_html__( 'Desktops: > 1199px', 'koncrete-core' ), 'options' => $this->rt_translate['cols'], 'default' => '4', ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'col_md', 'label' => esc_html__( 'Desktops: > 991px', 'koncrete-core' ), 'options' => $this->rt_translate['cols'], 'default' => '4', ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'col_sm', 'label' => esc_html__( 'Tablets: > 767px', 'koncrete-core' ), 'options' => $this->rt_translate['cols'], 'default' => '6', ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'col_xs', 'label' => esc_html__( 'Phones: < 768px', 'koncrete-core' ), 'options' => $this->rt_translate['cols'], 'default' => '12', ), array( 'mode' => 'section_end', ), // Slider options array( 'mode' => 'section_start', 'id' => 'sec_slider', 'condition' => array( 'style' => array( 'style3' ) ), 'label' => esc_html__( 'Slider Options', 'koncrete-core' ), ), array( 'type' => Controls_Manager::SWITCHER, 'id' => 'slider_autoplay', 'label' => esc_html__( 'Autoplay', 'koncrete-core' ), 'label_on' => esc_html__( 'On', 'koncrete-core' ), 'label_off' => esc_html__( 'Off', 'koncrete-core' ), 'default' => 'yes', 'description' => esc_html__( 'Enable or disable autoplay. Default: On', 'koncrete-core' ), ), array( 'type' => Controls_Manager::SWITCHER, 'id' => 'slider_stop_on_hover', 'label' => esc_html__( 'Stop on Hover', 'koncrete-core' ), 'label_on' => esc_html__( 'On', 'koncrete-core' ), 'label_off' => esc_html__( 'Off', 'koncrete-core' ), 'default' => 'yes', 'description' => esc_html__( 'Stop autoplay on mouse hover. Default: On', 'koncrete-core' ), 'condition' => array( 'slider_autoplay' => 'yes' ), ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'slider_interval', 'label' => esc_html__( 'Autoplay Interval', 'koncrete-core' ), 'options' => array( '5000' => esc_html__( '5 Seconds', 'koncrete-core' ), '4000' => esc_html__( '4 Seconds', 'koncrete-core' ), '3000' => esc_html__( '3 Seconds', 'koncrete-core' ), '2000' => esc_html__( '2 Seconds', 'koncrete-core' ), '1000' => esc_html__( '1 Second', 'koncrete-core' ), ), 'default' => '5000', 'description' => esc_html__( 'Set any value for example 5 seconds to play it in every 5 seconds. Default: 5 Seconds', 'koncrete-core' ), 'condition' => array( 'slider_autoplay' => 'yes' ), ), array( 'type' => Controls_Manager::NUMBER, 'id' => 'slider_autoplay_speed', 'label' => esc_html__( 'Autoplay Slide Speed', 'koncrete-core' ), 'default' => 200, 'description' => esc_html__( 'Slide speed in milliseconds. Default: 200', 'koncrete-core' ), 'condition' => array( 'slider_autoplay' => 'yes' ), ), array( 'type' => Controls_Manager::SWITCHER, 'id' => 'slider_loop', 'label' => esc_html__( 'Loop', 'koncrete-core' ), 'label_on' => esc_html__( 'On', 'koncrete-core' ), 'label_off' => esc_html__( 'Off', 'koncrete-core' ), 'default' => 'yes', 'description' => esc_html__( 'Loop to first item. Default: On', 'koncrete-core' ), ), array( 'mode' => 'section_end', ), // Responsive Columns for slider array( 'mode' => 'section_start', 'condition' => array( 'style' => array( 'style3' ) ), 'id' => 'sec_responsive_slider', 'label' => esc_html__( 'Number of Responsive Columns for slider', 'koncrete-core' ), ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'col_lg_slider', 'label' => esc_html__( 'Desktops: > 1199px', 'koncrete-core' ), 'options' => $this->rt_translate['cols_slider'], 'default' => '3', ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'col_md_slider', 'label' => esc_html__( 'Desktops: > 991px', 'koncrete-core' ), 'options' => $this->rt_translate['cols_slider'], 'default' => '3', ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'col_sm_slider', 'label' => esc_html__( 'Tablets: > 767px', 'koncrete-core' ), 'options' => $this->rt_translate['cols_slider'], 'default' => '2', ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'col_xs_slider', 'label' => esc_html__( 'Phones: < 768px', 'koncrete-core' ), 'options' => $this->rt_translate['cols_slider'], 'default' => '1', ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'col_mobile_slider', 'label' => esc_html__( 'Small Phones: < 480px', 'koncrete-core' ), 'options' => $this->rt_translate['cols_slider'], 'default' => '1', ), array( 'mode' => 'section_end', ), // STYLE SECTION // title array( 'mode' => 'section_start', 'id' => 'title_style', 'label' => esc_html__( 'Title Style', 'koncrete-core' ), 'tab' => Controls_Manager::TAB_STYLE, ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'title_typo', 'label' => esc_html__( 'Title Typography', 'koncrete-core' ), 'selector' => ' {{WRAPPER}} .rtel-radius-post-1 .rtin-radius-post-layout-1 .rtin-item-content h3, {{WRAPPER}} .rtel-radius-post-2 .rtin-radius-post-layout-2 .rtin-item-content .item-title, {{WRAPPER}} .rtel-radius-post-3 .rtin-radius-post-layout-3 .rtin-item-content h3, {{WRAPPER}} .rtel-radius-post-4 .rtin-radius-post-layout-4 .rtin-item-content h3, ', ), array( 'type' => Controls_Manager::COLOR, 'id' => 'title_color', 'label' => esc_html__( 'Title Color', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .rtel-radius-post-1 .rtin-radius-post-layout-1 .rtin-item-content h3 a' => 'color: {{VALUE}}', '{{WRAPPER}} .rtel-radius-post-2 .rtin-radius-post-layout-2 .rtin-item-content .item-title a' => 'color: {{VALUE}}', '{{WRAPPER}} .rtel-radius-post-3 .rtin-radius-post-layout-3 .rtin-item-content h3 a' => 'color: {{VALUE}}', '{{WRAPPER}} .rtel-radius-post-4 .rtin-radius-post-layout-4 .rtin-item-content h3 a' => 'color: {{VALUE}}', ), ), array( 'type' => Controls_Manager::COLOR, 'id' => 'title_hover_color', 'label' => esc_html__( 'Title Hover Color', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .rtel-radius-post-1 .rtin-radius-post-layout-1 .rtin-item-content h3 a:hover' => 'color: {{VALUE}}', '{{WRAPPER}} .rtel-radius-post-2 .rtin-radius-post-layout-2 .rtin-item-content .item-title a:hover' => 'color: {{VALUE}}', '{{WRAPPER}} .rtel-radius-post-3 .rtin-radius-post-layout-3 .rtin-item-content h3 a:hover' => 'color: {{VALUE}}', '{{WRAPPER}} .rtel-radius-post-4 .rtin-radius-post-layout-4 .rtin-item-content h3 a:hover' => 'color: {{VALUE}}', ), ), array( 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', '%', 'em' ), 'id' => 'title_content_margin', 'label' => __( 'Title Margin', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .rtel-radius-post-1 .rtin-radius-post-layout-1 .rtin-item-content h3' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', '{{WRAPPER}} .rtel-radius-post-2 .rtin-radius-post-layout-2 .rtin-item-content .item-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', '{{WRAPPER}} .rtel-radius-post-3 .rtin-radius-post-layout-3 .rtin-item-content h3' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', '{{WRAPPER}} .rtel-radius-post-4 .rtin-radius-post-layout-4 .rtin-item-content h3' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ), 'separator' => 'before', ), array( 'mode' => 'section_end', ), // subtitle array( 'mode' => 'section_start', 'id' => 'subtitle_style', 'label' => esc_html__( 'Subtitle Style', 'koncrete-core' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => array( 'style' => array( 'style1', 'style3', 'style4', 'style5', ) ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'subtitle_typo', 'label' => esc_html__( 'Subtitle Typography', 'koncrete-core' ), 'selector' => ' {{WRAPPER}} .rtel-radius-post-1 .rtin-radius-post-layout-1 .rtin-item-content p, {{WRAPPER}} .rtel-radius-post-3 .rtin-radius-post-layout-3 .rtin-item-content p, {{WRAPPER}} .rtel-radius-post-4 .rtin-radius-post-layout-4 .rtin-item-content p ', ), array( 'type' => Controls_Manager::COLOR, 'id' => 'subtitle_color', 'label' => esc_html__( 'Subtitle Color', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .rtel-radius-post-1 .rtin-radius-post-layout-1 .rtin-item-content p' => 'color: {{VALUE}}', '{{WRAPPER}} .rtel-radius-post-3 .rtin-radius-post-layout-3 .rtin-item-content p' => 'color: {{VALUE}}', '{{WRAPPER}} .rtel-radius-post-4 .rtin-radius-post-layout-4 .rtin-item-content p' => 'color: {{VALUE}}', ), ), array( 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', '%', 'em' ), 'id' => 'Subtitle_content_margin', 'label' => __( 'subtitle Margin', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .rtel-radius-post-1 .rtin-radius-post-layout-1 .rtin-item-content p' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', '{{WRAPPER}} .rtel-radius-post-3 .rtin-radius-post-layout-3 .rtin-item-content p' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', '{{WRAPPER}} .rtel-radius-post-4 .rtin-radius-post-layout-4 .rtin-item-content p' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ), 'separator' => 'before', ), array( 'mode' => 'section_end', ), // META ICON array( 'mode' => 'section_start', 'id' => 'meta_icon_style', 'label' => esc_html__( 'Meta Icon Style', 'koncrete-core' ), 'tab' => Controls_Manager::TAB_STYLE, ), array( 'type' => Controls_Manager::COLOR, 'id' => 'meta_icon_color', 'label' => esc_html__( 'Meta Icon Color', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .rtel-radius-post .rtin-entry-meta i' => 'color: {{VALUE}}', ), ), array( 'type' => Controls_Manager::SLIDER, 'mode' => 'responsive', 'id' => 'meta_icon_size', 'label' => __( 'Meta Icon Size', 'koncrete-core' ), 'size_units' => array('px', '%'), 'range' => array( 'px' => array( 'min' => 0, 'max' => 250, ), ), 'selectors' => array( '{{WRAPPER}} .rtel-radius-post .rtin-entry-meta i' => 'font-size: {{SIZE}}{{UNIT}};', ) ), array( 'mode' => 'section_end', ), array( 'mode' => 'section_start', 'id' => 'meta_text_style', 'label' => esc_html__( 'Meta Text Style', 'koncrete-core' ), 'tab' => Controls_Manager::TAB_STYLE, ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'meta_text_typography', 'label' => esc_html__( 'Meta Text Typography', 'koncrete-core' ), 'selector' => ' {{WRAPPER}} .rtel-radius-post .rtin-entry-meta .rtin-author a, {{WRAPPER}} .rtel-radius-post .rtin-entry-meta .rtin-comments span ', ), array( 'type' => Controls_Manager::COLOR, 'id' => 'meta_text_color', 'label' => esc_html__( 'Meta Text Color', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .rtel-radius-post .rtin-entry-meta .rtin-author a' => 'color: {{VALUE}}', '{{WRAPPER}} .rtel-radius-post .rtin-entry-meta .rtin-comments span' => 'color: {{VALUE}}', ), ), array( 'type' => Controls_Manager::COLOR, 'id' => 'meta_text_hover_color', 'label' => esc_html__( 'Meta Text Hover Color (link)', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .rtel-radius-post .rtin-entry-meta .rtin-author a:hover' => 'color: {{VALUE}}', ), ), array( 'mode' => 'section_end', ), // DATE style array( 'mode' => 'section_start', 'id' => 'date_style', 'label' => esc_html__( 'Date Style', 'koncrete-core' ), 'tab' => Controls_Manager::TAB_STYLE, ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'date_typo', 'label' => esc_html__( 'Date Typography', 'koncrete-core' ), 'selector' => ' {{WRAPPER}} .rtel-radius-post-1 .rtin-radius-post-layout-1 .rtin-item-content .post-date .date-text, {{WRAPPER}} .rtel-radius-post-2 .rtin-radius-post-layout-2 .rtin-item-content .rtin-post-date .date-text, {{WRAPPER}} .rtel-radius-post-3 .rtin-radius-post-layout-3 .rtin-item-content .rtin-post-date.has-image-date .date-text, {{WRAPPER}} .rtel-radius-post-4 .rtin-radius-post-layout-4 .rtin-item-content .rtin-post-date .date-text ', ), array( 'type' => Controls_Manager::COLOR, 'id' => 'Date_color', 'label' => esc_html__( 'date Color', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .rtel-radius-post-1 .rtin-radius-post-layout-1 .rtin-item-content .post-date' => 'color: {{VALUE}}', '{{WRAPPER}} .rtel-radius-post-2 .rtin-radius-post-layout-2 .rtin-item-content .rtin-post-date' => 'color: {{VALUE}}', '{{WRAPPER}} .rtel-radius-post-3 .rtin-radius-post-layout-3 .rtin-item-content .rtin-post-date.has-image-date' => 'color: {{VALUE}}', '{{WRAPPER}} .rtel-radius-post-4 .rtin-radius-post-layout-4 .rtin-item-content .rtin-post-date' => 'color: {{VALUE}}', ), ), array( 'type' => Controls_Manager::SLIDER, 'mode' => 'responsive', 'id' => 'date_icon_size', 'label' => __( 'Date Icon Size', 'koncrete-core' ), 'size_units' => array('px', '%'), 'range' => array( 'px' => array( 'min' => 0, 'max' => 250, ), ), 'selectors' => array( '{{WRAPPER}} .rtel-radius-post-1 .rtin-radius-post-layout-1 .rtin-item-content .post-date i' => 'font-size: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .rtel-radius-post-2 .rtin-radius-post-layout-2 .rtin-item-content .rtin-post-date i' => 'font-size: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .rtel-radius-post-3 .rtin-radius-post-layout-3 .rtin-item-content .rtin-post-date.has-image-date i' => 'font-size: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .rtel-radius-post-4 .rtin-radius-post-layout-4 .rtin-item-content .rtin-post-date i' => 'font-size: {{SIZE}}{{UNIT}};', ) ), array( 'type' => Controls_Manager::SLIDER, 'mode' => 'responsive', 'id' => 'date_icon_mr', 'label' => __( 'Date Icon Margin Right', 'koncrete-core' ), 'size_units' => array('px', '%'), 'range' => array( 'px' => array( 'min' => 0, 'max' => 70, ), ), 'selectors' => array( '{{WRAPPER}} .rtel-radius-post-1 .rtin-radius-post-layout-1 .rtin-item-content .post-date i' => 'margin-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .rtel-radius-post-2 .rtin-radius-post-layout-2 .rtin-item-content .rtin-post-date i' => 'margin-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .rtel-radius-post-3 .rtin-radius-post-layout-3 .rtin-item-content .rtin-post-date.has-image-date i' => 'margin-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .rtel-radius-post-4 .rtin-radius-post-layout-4 .rtin-item-content .rtin-post-date i' => 'margin-right: {{SIZE}}{{UNIT}};', ) ), array( 'mode' => 'group', 'separator' => 'before', 'label_block' => true, 'type' => Group_Control_Background::get_type(), 'name' => 'date_background', 'types' => array( 'classic', 'gradient', ), 'condition' => array( 'style' => array( 'style1', 'style3', 'style4', 'style5', ) ), 'fields_options' => array( 'background' => array( 'label' => esc_html__( 'Date Background', 'koncrete-core' ), ), ), 'selector' => ' {{WRAPPER}} .rtel-radius-post-1 .rtin-radius-post-layout-1 .rtin-item-content .post-date, {{WRAPPER}} .rtel-radius-post-3 .rtin-radius-post-layout-3 .rtin-item-content .rtin-post-date, {{WRAPPER}} .rtel-radius-post-4 .rtin-radius-post-layout-4 .rtin-item-content .rtin-post-date ', ), array( 'mode' => 'section_end', ), array( 'mode' => 'section_start', 'id' => 'pagination_style', 'label' => esc_html__( 'Pagination Style', 'koncrete-core' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => array( 'pagination_display' => 'yes', 'style' => array( 'style1', 'style2', 'style5', ) ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'pagination_typo', 'label' => esc_html__( 'Pagination Typography', 'koncrete-core' ), 'selector' => ' {{WRAPPER}} .pagination-layout1 ul li span, {{WRAPPER}} .pagination-layout1 ul li a ', ), array( 'type' => Controls_Manager::COLOR, 'id' => 'pagination_bg_color', 'label' => esc_html__( 'Pagination Background Color', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .pagination-layout1 ul li a' => 'background-color: {{VALUE}}', '{{WRAPPER}} .pagination-layout1 ul li span' => 'background-color: {{VALUE}}', ), ), array( 'type' => Controls_Manager::COLOR, 'id' => 'pagination_hover_bg_color', 'label' => esc_html__( 'Pagination Hover / Active Background Color', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .pagination-layout1 ul li.active span' => 'background: {{VALUE}}', '{{WRAPPER}} .pagination-layout1 ul li a:hover' => 'background: {{VALUE}}', '{{WRAPPER}} noselector' => 'background-color: {{VALUE}}', '{{WRAPPER}} noselector' => 'background-color: {{VALUE}}', '{{WRAPPER}} noselector' => 'background-color: {{VALUE}}', ), ), array( 'type' => Controls_Manager::COLOR, 'id' => 'pagination_text_color', 'label' => esc_html__( 'Pagination Text Color', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .pagination-layout1 ul li a' => 'color: {{VALUE}}', '{{WRAPPER}} .pagination-layout1 ul li span' => 'color: {{VALUE}}', ), ), array( 'type' => Controls_Manager::COLOR, 'id' => 'pagination_text_accent_color', 'label' => esc_html__( 'Pagination Text accent Color', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .pagination-layout1 ul li a:hover' => 'color: {{VALUE}}', '{{WRAPPER}} .pagination-layout1 ul li.active span' => 'color: {{VALUE}}', ), ), array( 'type' => Controls_Manager::COLOR, 'id' => 'disable_pagination_color', 'label' => esc_html__( 'Disable pagination Color', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .pagination-layout1 .pagi-next.disabled span' => 'color: {{VALUE}}', '{{WRAPPER}} .pagination-layout1 .pagi-previous.disabled span' => 'color: {{VALUE}}', ), 'default' => '#999', ), array( 'type' => Controls_Manager::COLOR, 'id' => 'disable_pagination_background_color', 'label' => esc_html__( 'Disable pagination Background Color', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .pagination-layout1 .pagi-next.disabled span' => 'background-color: {{VALUE}}', '{{WRAPPER}} .pagination-layout1 .pagi-previous.disabled span' => 'background-color: {{VALUE}}', ), 'default' => '#fff', ), array( 'mode' => 'section_end', ), ); return $fields; } protected function render() { $this->rt_load_scripts(); $data = $this->get_settings(); $uniqueid = uniqid(); $owl_data = array( 'nav' => true, 'navText' => array('<i class="flaticon-left-arrow" aria-hidden="true"></i>', '<i class="flaticon-right-arrow" aria-hidden="true"></i>'), 'navContainer' => '#'.$uniqueid, 'dots' => false, 'autoplay' => $data['slider_autoplay'] == 'yes' ? true : false, 'autoplayTimeout' => $data['slider_interval'], 'autoplaySpeed' => $data['slider_autoplay_speed'], 'autoplayHoverPause' => $data['slider_stop_on_hover'] == 'yes' ? true : false, 'loop' => $data['slider_loop'] == 'yes' ? true : false, 'margin' => 10, 'smartSpeed' => 1200, 'responsive' => array( '0' => array( 'items' => $data['col_mobile_slider'], 'nav' => true, 'dots' => false, ), '480' => array( 'items' => $data['col_xs_slider'], 'nav' => true, 'dots' => false, ), '768' => array( 'items' => $data['col_sm_slider'], 'nav' => true, 'dots' => false, ), '992' => array( 'items' => $data['col_md_slider'], 'nav' => true, 'dots' => false, ), '1200' => array( 'items' => $data['col_lg_slider'], 'nav' => true, 'dots' => false, ), ) ); if ( is_rtl () ) { $owl_data['rtl'] = true; } $data['owl_data'] = json_encode( $owl_data ); $data['uniqueid'] = $uniqueid; switch ( $data['style'] ) { case 'style2': $template = 'view-2'; break; case 'style3': $template = 'view-3'; break; case 'style4': $template = 'view-4'; break; case 'style5': $template = 'view-5'; break; default: $template = 'view-1'; break; } return $this->rt_template( $template, $data ); } }
Save
Cancel