PATH:
home
/
letacommog
/
aperobusiness
/
wp-content
/
themes
/
deep
/
inc
/
core
/
elementor
/
widgets
<?php namespace Elementor; class Webnus_Element_Widgets_Buy_Process extends \Elementor\Widget_Base { /** * Retrieve Buy Process widget name. * * @since 1.0.0 * @access public * * @return string Widget name. */ public function get_name() { return 'buy_process'; } /** * Retrieve Buy Process widget title. * * @since 1.0.0 * @access public * * @return string Widget title. */ public function get_title() { return esc_html__( 'Webnus Buy Process', 'deep' ); } /** * Retrieve Buy Process widget icon. * * @since 1.0.0 * @access public * * @return string Widget icon. */ public function get_icon() { return 'eicon-sync'; } /** * Set widget category. * * @since 1.0.0 * @access public * * @return array Widget category. */ public function get_categories() { return [ 'webnus' ]; } /** * Register Buy Process widget controls. * * * @since 1.0.0 * @access protected */ protected function _register_controls() { // Content Tab $this->start_controls_section( 'content_section', [ 'label' => esc_html__( 'General', 'deep' ), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'process_item', [ 'label' => esc_html__( 'Process Item', 'deep' ), 'type' => \Elementor\Controls_Manager::REPEATER, 'description' => esc_html__( 'If you want this element cover whole page width, please add it inside of a full row. For this purpose, click on edit button of the row and set Select Row Type on Full Width Row.', 'deep' ), 'fields' => [ [ 'name' => 'process_title', 'label' => esc_html__( 'Process Title', 'deep' ), 'type' => \Elementor\Controls_Manager::TEXT, ], [ 'name' => 'process_content', 'label' => esc_html__( 'Process Content', 'deep' ), 'type' => \Elementor\Controls_Manager::TEXTAREA, ], [ 'name' => 'line_flag', 'label' => esc_html__( 'Line number (or text)', 'deep' ), 'type' => \Elementor\Controls_Manager::TEXT, ], [ 'name' => 'process_style', 'label' => esc_html__( 'Process Style', 'deep' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'default', 'options' => [ 'default' => esc_html__( 'Default Porcess', 'deep' ), 'featured' => esc_html__( 'Featured Porcess', 'deep' ), ] ], [ 'name' => 'icon_fontawesome', 'label' => esc_html__( 'Icons', 'deep' ), 'type' => \Elementor\Controls_Manager::ICON, 'default' => 'fa fa-adjust', 'description' => esc_html__( 'Select icon from library.', 'deep' ), ] ], 'default' => [ [ 'process_title' => __( 'Step 1', 'deep' ), 'process_content' => esc_html__( 'It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.' , 'deep' ), ], [ 'process_title' => __( 'Step 2', 'deep' ), 'process_content' => esc_html__( 'It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.' , 'deep' ), ], [ 'process_title' => __( 'Step 3', 'deep' ), 'process_content' => esc_html__( 'It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.' , 'deep' ), ], ], ] ); $this->add_control( 'bg_color', //param_name [ 'label' => esc_html__( 'Background color', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::COLOR, //type 'selectors' => [ '{{WRAPPER}} .buy-process-wrap' => 'background-color: {{VALUE}}', ], 'description' => esc_html__( 'Select custom background color', 'deep' ), ] ); $this->end_controls_section(); // Class & ID Tab $this->start_controls_section( 'classid_section', [ 'label' => esc_html__( 'Class & ID', 'deep' ), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'shortcodeclass', [ 'label' => esc_html__( 'Extra Class', 'deep' ), 'type' => \Elementor\Controls_Manager::TEXT, ] ); $this->add_control( 'shortcodeid', [ 'label' => esc_html__( 'ID', 'deep' ), 'type' => \Elementor\Controls_Manager::TEXT, ] ); $this->end_controls_section(); // Style $this->start_controls_section( 'section_main_style', [ 'label' => __( 'Line/Icon style', 'deep' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'line_color', //param_name [ 'label' => __( 'Line Color', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::COLOR, //type 'selectors' => [ '#wrap {{WRAPPER}} .buy-process-item .icon-wrapper:before,#wrap {{WRAPPER}} .buy-process-wrap:before,#wrap {{WRAPPER}} .buy-process-item i' => 'background-color: {{VALUE}}', ], ] ); $this->add_control( 'icon_color', //param_name [ 'label' => __( 'Icons Color', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::COLOR, //type 'selectors' => [ '#wrap {{WRAPPER}} .buy-process-item i' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'icon_font_size', [ 'label' => __( 'Icon Font Size', 'deep' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 200, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 45, ], 'selectors' => [ '#wrap {{WRAPPER}} .buy-process-item i' => 'font-size: {{SIZE}}{{UNIT}};', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'section_title_style', [ 'label' => __( 'Title style', 'deep' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'title_color', //param_name [ 'label' => __( 'Color', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::COLOR, //type 'selectors' => [ '#wrap {{WRAPPER}} .buy-process-item h4' => 'color: {{VALUE}}', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'title_typography', 'label' => __( 'Typography', 'deep' ), 'scheme' => Scheme_Typography::TYPOGRAPHY_2, 'selector' => '#wrap {{WRAPPER}} .buy-process-item h4', ] ); $this->add_control( 'title_padding', //param_name [ 'label' => __( 'Padding', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::DIMENSIONS, //type 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '#wrap {{WRAPPER}} .buy-process-item h4' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'title_margin', //param_name [ 'label' => __( 'Margin', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::DIMENSIONS, //type 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '#wrap {{WRAPPER}} .buy-process-item h4' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'section_content_style', [ 'label' => __( 'Content style', 'deep' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'content_color', //param_name [ 'label' => __( 'Color', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::COLOR, //type 'selectors' => [ '#wrap {{WRAPPER}} .buy-process-item p' => 'color: {{VALUE}}', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'content_typography', 'label' => __( 'Typography', 'deep' ), 'scheme' => Scheme_Typography::TYPOGRAPHY_2, 'selector' => '#wrap {{WRAPPER}} .buy-process-item p', ] ); $this->add_control( 'content_padding', //param_name [ 'label' => __( 'Padding', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::DIMENSIONS, //type 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '#wrap {{WRAPPER}} .buy-process-item p' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'content_margin', //param_name [ 'label' => __( 'Margin', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::DIMENSIONS, //type 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '#wrap {{WRAPPER}} .buy-process-item p' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); // Custom css tab $this->start_controls_section( 'custom_css_section_style', [ 'label' => __( 'Custom CSS', 'deep' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $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 Buy Process widget output on the frontend. * * * @since 1.0.0 * @access protected */ protected function render() { $settings = $this->get_settings_for_display(); wp_enqueue_style( 'wn-deep-buy-process', DEEP_ASSETS_URL . 'css/frontend/buy-process/buy-process.css' ); $shortcodeclass = $settings['shortcodeclass'] ? $settings['shortcodeclass'] : ''; $shortcodeid = $settings['shortcodeid'] ? ' id="' . $settings['shortcodeid'] . '"' : ''; // process_item loop $process_item_data = array(); // Fetch Carousle Item Loop Variables if ($settings['process_item']) { foreach ( $settings['process_item'] as $data ) : $new_line = $data; $new_line['process_title'] = isset( $data['process_title'] ) ? $data['process_title'] : ''; $new_line['process_content'] = isset( $data['process_content'] ) ? $data['process_content'] : ''; $new_line['icon_fontawesome'] = isset( $data['icon_fontawesome'] ) ? $data['icon_fontawesome'] : 'fa fa-adjust'; $new_line['line_flag'] = isset( $data['line_flag'] ) ? $data['line_flag'] : ''; $new_line['process_style'] = isset( $data['process_style'] ) && $data['process_style'] == 'featured' ? ' ' . $data['process_style'] : ''; $process_item_data[] = $new_line; endforeach; } // render $out = ' <div class="buy-process-wrap ' . $shortcodeclass . '" ' . $shortcodeid . '> <div class="buy-process-items">'; foreach ( $process_item_data as $line ) : $out .= ' <div class="buy-process-item' . $line['process_style'] . '"> <div class="text-wrap"> <h4>' . $line['process_title'] . '</h4> <p>' . $line['process_content'] . '</p> </div> <span>' . $line['line_flag'] . '</span> <div class="icon-wrapper"> <i class="' . esc_attr( $line['icon_fontawesome'] ) . '"></i> </div> </div>'; endforeach; $out .= ' </div> </div>'; $custom_css = $settings['custom_css']; if ( $custom_css != '' ) { echo '<style>'. $custom_css .'</style>'; } echo $out; } }
[+]
..
[-] 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]