PATH:
home
/
letacommog
/
aperobusiness
/
wp-content
/
themes
/
deep
/
inc
/
core
/
elementor
/
widgets
<?php namespace Elementor; class Webnus_Element_Widgets_Subscribe extends \Elementor\Widget_Base { /** * Retrieve widget name. * * @since 1.0.0 * @access public * * @return string Widget name. */ public function get_name() { return 'subscribe'; } /** * Retrieve widget title. * * @since 1.0.0 * @access public * * @return string Widget title. */ public function get_title() { return esc_html__( 'Webnus Subscribe', 'deep' ); } /** * Retrieve widget icon. * * @since 1.0.0 * @access public * * @return string Widget icon. */ public function get_icon() { return 'eicon-mail'; } /** * Set widget category. * * @since 1.0.0 * @access public * * @return array Widget category. */ public function get_categories() { return [ 'webnus' ]; } /** * Register 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( 'type', [ 'label' => esc_html__( "Type", 'deep' ), 'type' => \Elementor\Controls_Manager::SELECT, 'description' => esc_html__( "Select style type", 'deep'), 'options' => [ "boxed" => esc_html__( "Boxed", 'deep'), "bar1" => esc_html__( "Bar", 'deep'), "flat" => esc_html__( "Flat", 'deep'), "wish" => esc_html__( "Wish", 'deep') , "modern" => esc_html__( "Modern", 'deep') , "bordered" => esc_html__( "Bordered", 'deep'), "rounded" => esc_html__( "Rounded", 'deep'), "full" => esc_html__( "Full", 'deep' ), ], 'default' => 'boxed', ] ); $this->add_control( 'box_title', [ 'label' => esc_html__( "Title", 'deep' ), 'type' => \Elementor\Controls_Manager::TEXT, 'description' => esc_html__( "Subscribe title", 'deep'), 'condition' => [ 'type' => [ 'boxed', 'bar1', 'flat' , 'bordered', ] ] ] ); $this->add_control( 'input_text', [ 'label' => esc_html__( 'input text', 'deep' ), 'type' => \Elementor\Controls_Manager::TEXT, 'description' => esc_html__( 'input box text', 'deep'), 'placeholder' => esc_html__( 'YOUR E-MAIL', 'deep' ), ] ); $this->add_control( 'box_text', [ 'label' => esc_html__( "Subscribe Text", 'deep' ), 'type' => \Elementor\Controls_Manager::TEXT, 'description' => esc_html__( "Subscribe content", 'deep'), 'condition' => [ 'type' => [ 'boxed', 'bar1', 'flat' , 'bordered', ] ] ] ); $this->add_control( 'service', [ 'label' => esc_html__( "Email Service", 'deep' ), 'type' => \Elementor\Controls_Manager::SELECT, 'description' => esc_html__( "FeedBurner or MailChimp", 'deep'), 'options' => [ 'feedburner' => 'FeedBurner', 'mailchimp' => 'MailChimp', ], 'default' => 'feedburner', ] ); $this->add_control( 'feedburner_id', [ 'label' => esc_html__( "FeedBurner ID", 'deep' ), 'type' => \Elementor\Controls_Manager::TEXT, 'description' => esc_html__( "FeedBurner ID", 'deep'), 'condition' => [ 'service' => [ 'feedburner' ] ] ] ); $this->add_control( 'mailchimp_url', [ 'label' => esc_html__( "MailChimp URL", 'deep' ), 'type' => \Elementor\Controls_Manager::TEXT, 'description' => esc_html__( "Mailchimp form action URL", 'deep'), 'condition' => [ 'service' => [ 'mailchimp' ] ] ] ); $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_title_style', [ 'label' => __( 'Title Style', 'deep' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'title_typography', 'label' => __( 'Typography', 'deep' ), 'scheme' => Scheme_Typography::TYPOGRAPHY_2, 'selector' => '#wrap {{WRAPPER}} h3', ] ); $this->add_control( 'title_color', [ 'label' => __( 'Color', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::COLOR, //type 'selectors' => [ '#wrap {{WRAPPER}} h3' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'title_padding', //param_name [ 'label' => __( 'Padding', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::DIMENSIONS, //type 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '#wrap {{WRAPPER}} h3' => '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}} h3' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'section_subscribe_text_style', [ 'label' => __( 'Subscribe Text Style', 'deep' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'subscribe_text_typography', 'label' => __( 'Typography', 'deep' ), 'scheme' => Scheme_Typography::TYPOGRAPHY_2, 'selector' => '#wrap {{WRAPPER}} .subscribe-box-text p', ] ); $this->add_control( 'subscribe_text_color', [ 'label' => __( 'Color', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::COLOR, //type 'selectors' => [ '#wrap {{WRAPPER}} .subscribe-box-text p' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'subscribe_text_padding', //param_name [ 'label' => __( 'Padding', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::DIMENSIONS, //type 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '#wrap {{WRAPPER}} .subscribe-box-text p' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'subscribe_text_margin', //param_name [ 'label' => __( 'Margin', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::DIMENSIONS, //type 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '#wrap {{WRAPPER}} .subscribe-box-text p' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'section_input_style', [ 'label' => __( 'Input Style', 'deep' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'input_border', 'label' => __( 'Border', 'deep' ), 'selector' => '#wrap {{WRAPPER}} .subscribe-box-input input', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'input_shadow', 'label' => __( 'Shadow', 'deep' ), 'selector' => '#wrap {{WRAPPER}} .subscribe-box-input input', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'input_typography', 'label' => __( 'Typography', 'deep' ), 'scheme' => Scheme_Typography::TYPOGRAPHY_2, 'selector' => '#wrap {{WRAPPER}} .subscribe-box-input input', ] ); $this->add_control( 'input_color', [ 'label' => __( 'Color', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::COLOR, //type 'selectors' => [ '#wrap {{WRAPPER}} .subscribe-box-input input' => 'color: {{VALUE}}', ], ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'input_solid', 'label' => __( 'Background', 'deep' ), 'types' => [ 'classic' , 'gradient' ], 'selector' => '#wrap {{WRAPPER}} .subscribe-box-input input', ] ); $this->add_control( 'input_padding', //param_name [ 'label' => __( 'Padding', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::DIMENSIONS, //type 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '#wrap {{WRAPPER}} .subscribe-box-input input' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'input_margin', //param_name [ 'label' => __( 'Margin', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::DIMENSIONS, //type 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '#wrap {{WRAPPER}} .subscribe-box-input input' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'section_button_style', [ 'label' => __( 'Button Style', 'deep' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'button_border', 'label' => __( 'Border', 'deep' ), 'selector' => '#wrap {{WRAPPER}} .subscribe-box-input button', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'button_shadow', 'label' => __( 'Shadow', 'deep' ), 'selector' => '#wrap {{WRAPPER}} .subscribe-box-input button', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'button_typography', 'label' => __( 'Typography', 'deep' ), 'scheme' => Scheme_Typography::TYPOGRAPHY_2, 'selector' => '#wrap {{WRAPPER}} .subscribe-box-input button', ] ); $this->add_control( 'button_color', [ 'label' => __( 'Color', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::COLOR, //type 'selectors' => [ '#wrap {{WRAPPER}} .subscribe-box-input button' => 'color: {{VALUE}}', ], ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'button_solid', 'label' => __( 'Background', 'deep' ), 'types' => [ 'classic' , 'gradient' ], 'selector' => '#wrap {{WRAPPER}} .subscribe-box-input button', ] ); $this->add_control( 'button_padding', //param_name [ 'label' => __( 'Padding', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::DIMENSIONS, //type 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '#wrap {{WRAPPER}} .subscribe-box-input button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'button_margin', //param_name [ 'label' => __( 'Margin', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::DIMENSIONS, //type 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '#wrap {{WRAPPER}} .subscribe-box-input button' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'section_box_style', [ 'label' => __( 'Box Style', 'deep' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'box_border', 'label' => __( 'Border', 'deep' ), 'selector' => '#wrap {{WRAPPER}} .wn-sb-hole', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'box_shadow', 'label' => __( 'Shadow', 'deep' ), 'selector' => '#wrap {{WRAPPER}} .wn-sb-hole', ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'box_solid', 'label' => __( 'Background', 'deep' ), 'types' => [ 'classic' , 'gradient' ], 'selector' => '#wrap {{WRAPPER}} .wn-sb-hole', ] ); $this->add_control( 'box_padding', //param_name [ 'label' => __( 'Padding', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::DIMENSIONS, //type 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '#wrap {{WRAPPER}} .wn-sb-hole' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'box_margin', //param_name [ 'label' => __( 'Margin', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::DIMENSIONS, //type 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '#wrap {{WRAPPER}} .wn-sb-hole' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); // Custom css tab $this->start_controls_section( 'custom_css_section', [ '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 Tooltip 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-subscribe', DEEP_ASSETS_URL . 'css/frontend/subscribe/subscribe.css' ); $shortcodeclass = $settings['shortcodeclass'] ? $settings['shortcodeclass'] : ''; $shortcodeid = $settings['shortcodeid'] ? ' id="' . $settings['shortcodeid'] . '"' : ''; ob_start(); $title = ( $settings['box_title'] ) ? '<h3>'.$settings['box_title'].'</h3>' : '' ; $email_name = ( $settings['service'] == 'FeedBurner' ) ? 'email' : 'MERGE0' ; $text = ( $settings['box_text'] ) ? '<div class="subscribe-box-text"><p>' . $settings['box_text'] . '</p></div>' : '' ; $inputtext = ( $settings['input_text'] ) ? $settings['input_text'] : 'YOUR E-MAIL' ; $input = ' <div class="subscribe-box-input ' . $shortcodeclass . '" ' . $shortcodeid . '> <input placeholder=" '. $inputtext .'" class="subscribe-box-email" type="email" name="'.$email_name.'" required> <button class="subscribe-box-submit button medium" type="submit"> <span>'. esc_html__('SUBSCRIBE','deep').'</span> </button> </div>'; if ($settings['type'] == 'boxed'){ echo ' <div class="wn-sb-hole subscribe-box ' . $shortcodeclass . '" ' . $shortcodeid . '> <div class="subscribe-box-top"> <i class="ti-rss"></i>' . $title . ' </div>'; } else { echo '<div class="wn-sb-hole subscribe-'.$settings['type'].' ' . $shortcodeclass . '" ' . $shortcodeid . '>' . $title; } ?> <?php if ($settings['service'] == 'feedburner') { ?> <form class="subscribe-box-form" action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onSubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=<?php echo esc_url( $settings['feedburner_id'] ); ?>', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true"> <input type="hidden" value="<?php echo esc_attr($settings['feedburner_id']); ?>" name="uri"/> <input type="hidden" name="loc" value="en_US"/> <?php } elseif($settings['service'] == 'mailchimp'){ ?> <form action="<?php echo esc_url($settings['mailchimp_url']); ?>" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form"> <?php } ?> <?php if($settings['type'] == 'bar1'){ if($text){ echo '<div class="container ' . $shortcodeclass . '" ' . $shortcodeid . '><div class="col-md-6">' . $text . '</div><div class="col-md-6">' .$input . '</div></div>'; }else{ echo '' . $input; } }else{ echo '' . $text.$input; }?> </form> </div> <?php $out = ob_get_contents(); ob_end_clean(); $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]