PATH:
home
/
letacommog
/
aperobusiness
/
wp-content
/
themes
/
deep
/
inc
/
core
/
elementor
/
widgets
<?php namespace Elementor; class Webnus_Element_Widgets_Tab_Widget extends \Elementor\Widget_Base { /** * Retrieve Tab Widget widget name. * * @since 1.0.0 * @access public * * @return string Widget name. */ public function get_name() { return 'w_tab'; } /** * Retrieve Tab Widget widget title. * * @since 1.0.0 * @access public * * @return string Widget title. */ public function get_title() { return __( 'Webnus Tab Widget', 'deep' ); } /** * Retrieve Tab Widget widget icon. * * @since 1.0.0 * @access public * * @return string Widget icon. */ public function get_icon() { return 'ti-settings'; } /** * Set widget category. * * @since 1.0.0 * @access public * * @return array Widget category. */ public function get_categories() { return [ 'webnus' ]; } /** * enqueue JS * * @since 1.0.0 * @access public */ public function get_script_depends() { return [ 'widget-tabs' ]; } /** * Register Tab Widget widget controls. * * @since 1.0.0 * @access protected */ protected function _register_controls() { // Content Tab $this->start_controls_section( 'content_section', [ 'label' => __( 'General', 'deep' ), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'sort_by', // param_name [ 'label' => __( 'Popular Posts Order By', 'deep' ), // heading 'type' => \Elementor\Controls_Manager::SELECT, // type 'default' => 'comments', 'options' => [ // value 'comments' => __( 'Comments', 'deep' ), 'views' => __( 'Views', 'deep' ), ], ] ); $this->add_control( 'counter_popular_post', // param_name [ 'label' => __( 'Number of popular posts', 'deep' ), // heading 'type' => \Elementor\Controls_Manager::TEXT, // type 'default' => '5', ] ); $this->add_control( 'counter_recent_post', // param_name [ 'label' => __( 'Number of recent posts', 'deep' ), // heading 'type' => \Elementor\Controls_Manager::TEXT, // type 'default' => '5', ] ); $this->add_control( 'counter_comments_post', // param_name [ 'label' => __( 'Number of comments', 'deep' ), // heading 'type' => \Elementor\Controls_Manager::TEXT, // type 'default' => '5', ] ); $this->add_control( 'show_popular_posts', // param_name [ 'label' => __( 'Popular posts', 'deep' ), // heading 'type' => \Elementor\Controls_Manager::SWITCHER, // type 'label_on' => __( 'ON', 'deep' ), 'label_off' => __( 'OFF', 'deep' ), 'return_value' => 'on', 'default' => 'on', ] ); $this->add_control( 'show_recent_posts', // param_name [ 'label' => __( 'Recent posts', 'deep' ), // heading 'type' => \Elementor\Controls_Manager::SWITCHER, // type 'label_on' => __( 'ON', 'deep' ), 'label_off' => __( 'OFF', 'deep' ), 'return_value' => 'on', 'default' => 'on', ] ); $this->add_control( 'show_comments', // param_name [ 'label' => __( 'Comments', 'deep' ), // heading 'type' => \Elementor\Controls_Manager::SWITCHER, // type 'label_on' => __( 'ON', 'deep' ), 'label_off' => __( 'OFF', 'deep' ), 'return_value' => 'on', 'default' => 'on', ] ); $this->end_controls_section(); // Custom css tab $this->start_controls_section( 'custom_css_section', [ 'label' => __( 'Custom CSS', 'deep' ), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'custom_css', [ 'label' => __( 'Custom CSS', 'deep' ), 'type' => \Elementor\Controls_Manager::CODE, 'language' => 'css', 'rows' => 20, 'show_label' => true, ] ); $this->end_controls_section(); } /** * Render Tab Widget widget output on the frontend. * * @since 1.0.0 * @access protected */ protected function render() { $settings = $this->get_settings_for_display(); $counter_popular_post = ! empty( $settings['counter_popular_post'] ) ? $settings['counter_popular_post'] : ''; $counter_recent_post = ! empty( $settings['counter_recent_post'] ) ? $settings['counter_recent_post'] : ''; $counter_comments_post = ! empty( $settings['counter_comments_post'] ) ? $settings['counter_comments_post'] : ''; $show_popular = $settings['show_popular_posts'] == 'on' ? 'on' : ''; $show_comments = $settings['show_comments'] == 'on' ? 'on' : ''; $show_recent = $settings['show_recent_posts'] == 'on' ? 'on' : ''; $sort_by = ! empty( $settings['sort_by'] ) ? $settings['sort_by'] : ''; $instance = array( 'posts' => $counter_popular_post, 'comments' => $counter_comments_post, 'tags' => $counter_recent_post, 'show_popular_posts' => $show_popular, 'show_recent_posts' => $show_recent, 'show_comments' => $show_comments, 'show_tags' => '', 'orderby' => $sort_by, ); $args = array( 'before_title' => '<div class="subtitle-wrap"><h4 class="subtitle">', 'after_title' => '</h4></div>', ); $custom_css = $settings['custom_css']; if ( $custom_css != '' ) { echo '<style>' . $custom_css . '</style>'; } echo get_the_widget( 'WebnusWidgetTabs', $instance, $args ); } }
[+]
..
[-] our-client.php
[edit]
[-] icons.php
[edit]
[-] collection.php
[edit]
[-] testimonial-tab.php
[edit]
[-] teaserbox.php
[edit]
[-] instagram.php
[edit]
[-] our-team.php
[edit]
[-] content-carousel.php
[edit]
[-] videoteaser.php
[edit]
[-] like-view-share.php
[edit]
[-] courses-instructors.php
[edit]
[-] widget-flickr.php
[edit]
[-] reservation.php
[edit]
[-] list.php
[edit]
[-] road-map.php
[edit]
[-] max-counter.php
[edit]
[-] magazine.php
[edit]
[-] prayer-wall-items.php
[edit]
[-] facebook-button.php
[edit]
[-] icon-divider.php
[edit]
[-] featured-products.php
[edit]
[-] review-items.php
[edit]
[-] iconbox.php
[edit]
[-] widget-googleplus.php
[edit]
[-] content-slider.php
[edit]
[-] service-carousel.php
[edit]
[-] contact-form.php
[edit]
[-] twitter-feed.php
[edit]
[-] blog.php
[edit]
[-] process-carousel.php
[edit]
[-] course-category.php
[edit]
[-] virtual-coins.php
[edit]
[-] speakers.php
[edit]
[-] the-grid.php
[edit]
[-] custom-menu.php
[edit]
[-] widget-youtube.php
[edit]
[-] testimonial.php
[edit]
[-] callout.php
[edit]
[-] testimonial-slider.php
[edit]
[-] category-tab.php
[edit]
[-] testimonial-carousel.php
[edit]
[-] button.php
[edit]
[-] facebook-comments.php
[edit]
[-] widget-login.php
[edit]
[-] subscribe.php
[edit]
[-] googlemap.php
[edit]
[-] widget-social-icon.php
[edit]
[-] postslider.php
[edit]
[-] alert.php
[edit]
[-] video-play-button.php
[edit]
[-] quote.php
[edit]
[-] donate.php
[edit]
[-] dropcap.php
[edit]
[-] before-after-image.php
[edit]
[-] pricing-tables.php
[edit]
[-] facebook-page.php
[edit]
[-] shop-products.php
[edit]
[-] single-goal.php
[edit]
[-] info-box.php
[edit]
[-] latestfromblog.php
[edit]
[-] goals.php
[edit]
[-] revolution-slider.php
[edit]
[-] widget-subscribe.php
[edit]
[-] tablepress.php
[edit]
[-] tab-content.php
[edit]
[-] schedule.php
[edit]
[-] sermon-category.php
[edit]
[-] pricing-plan.php
[edit]
[-] tabs.php
[edit]
[-] widget-latest-posts.php
[edit]
[-] distance.php
[edit]
[-] widget-popular-posts.php
[edit]
[-] recipes.php
[edit]
[-] causes.php
[edit]
[-] widget-testimonial.php
[edit]
[-] widget-about.php
[edit]
[-] special-offers.php
[edit]
[-] tooltip.php
[edit]
[-] food-menu.php
[edit]
[-] wp-hotel-booking.php
[edit]
[-] widget-tab.php
[edit]
[-] courses.php
[edit]
[-] login.php
[edit]
[-] post-from-blog.php
[edit]
[-] socials.php
[edit]
[-] line.php
[edit]
[-] gallery.php
[edit]
[-] faq.php
[edit]
[-] piecharts.php
[edit]
[-] image-hotspot.php
[edit]
[-] link.php
[edit]
[-] prayer-wall-form.php
[edit]
[-] rooms.php
[edit]
[-] countdown.php
[edit]
[-] portfolio-carousel.php
[edit]
[-] facebook-embed.php
[edit]
[-] single-cause.php
[edit]
[-] review-form.php
[edit]
[-] buy-process.php
[edit]
[-] sermons.php
[edit]
[-] widget-facebook.php
[edit]
[-] single-sermon.php
[edit]
[-] single-course.php
[edit]
[-] image-carousel.php
[edit]
[-] toggle-box.php
[edit]
[-] our-process.php
[edit]
[-] svg.php
[edit]
[-] w-title.php
[edit]
[-] block-quote.php
[edit]