PATH:
home
/
thecwrif
/
public_html
/
wp-content
/
plugins
/
jeg-elementor-kit
/
class
/
elements
/
views
<?php /** * Search View Class * * @package jeg-elementor-kit * @author Jegtheme * @since 1.10.0 */ namespace Jeg\Elementor_Kit\Elements\Views; /** * Class Search_View * * @package Jeg\Elementor_Kit\Elements\Views */ class Search_View extends View_Abstract { /** * Build block content */ public function build_content() { $output = null; $icon = $this->render_icon_element( $this->attribute['sg_search_icon'] ); $type = $this->attribute['sg_search_style']; if ( 'popup' === $type ) { $output = $this->render_modal( $icon ); } else { $output = $this->render_form( $icon ); } return $this->render_wrapper( 'search', $output ); } /** * Render Modal * * @param string $icon Rendered icon. */ private function render_modal( $icon ) { $search_modal_class = 'jkit-search-modal'; if ( 'gradient' === $this->attribute['st_icon_normal_background_background_background'] || 'gradient' === $this->attribute['st_icon_hover_background_background_background'] ) { $search_modal_class .= ' hover-gradient'; } return '<a href="#" class="' . $search_modal_class . '">' . $icon . '</a> <div class="jkit-modal-search-panel-wrapper"> <div class="jkit-modal-search-panel"> ' . $this->render_form( $icon ) . ' </div> </div>'; } /** * Render Form * * @param string $icon Rendered icon. */ private function render_form( $icon ) { $language_prefix = function_exists( 'pll_current_language' ) ? pll_current_language() : ''; $placeholder = esc_attr( $this->attribute['sg_search_placeholder'] ); $button_icon = 'icon' === $this->attribute['sg_search_button_style'] ? $icon : esc_attr( $this->attribute['sg_search_text'] ); $button_class = 'jkit-search-button'; $input_class = 'jkit-search-field'; if ( 'gradient' === $this->attribute['st_button_background_background_background'] || 'gradient' === $this->attribute['st_button_hover_background_background_background'] ) { $button_class .= ' hover-gradient'; } return '<div class="jkit-search-panel"> <form role="search" method="get" class="jkit-search-group" action="' . esc_url( home_url( '/' . $language_prefix ) ) . '"> <input type="search" class="' . $input_class . '" placeholder="' . $placeholder . '" value="' . esc_attr( get_search_query() ) . '" name="s" /> <button type="submit" class="' . $button_class . '" aria-label="search-button">' . $button_icon . '</button> </form> </div>'; } }
[-] class-view-abstract.php
[edit]
[-] class-post-terms-view.php
[edit]
[-] class-post-title-view.php
[edit]
[-] class-pie-chart-view.php
[edit]
[-] class-product-carousel-view.php
[edit]
[-] class-image-box-view.php
[edit]
[-] class-animated-text-view.php
[edit]
[-] class-feature-list-view.php
[edit]
[-] class-post-date-view.php
[edit]
[-] class-contact-form-7-view.php
[edit]
[-] class-post-featured-image-view.php
[edit]
[-] class-post-list-view.php
[edit]
[-] class-icon-box-view.php
[edit]
[-] class-post-comment-view.php
[edit]
[-] class-view-woocommerce-abstract.php
[edit]
[-] class-post-content-view.php
[edit]
[-] class-accordion-view.php
[edit]
[+]
..
[-] class-post-block-view.php
[edit]
[-] class-social-share-view.php
[edit]
[-] class-nav-menu-view.php
[edit]
[-] class-mailchimp-view.php
[edit]
[-] class-dual-button-view.php
[edit]
[-] class-client-logo-view.php
[edit]
[-] class-product-categories-view.php
[edit]
[-] class-banner-view.php
[edit]
[-] class-fun-fact-view.php
[edit]
[-] class-portfolio-gallery-view.php
[edit]
[-] class-post-excerpt-view.php
[edit]
[-] class-button-view.php
[edit]
[-] class-product-grid-view.php
[edit]
[-] class-post-author-view.php
[edit]
[-] class-progress-bar-view.php
[edit]
[-] class-video-button-view.php
[edit]
[-] class-gallery-view.php
[edit]
[-] class-tabs-view.php
[edit]
[-] class-countdown-view.php
[edit]
[-] class-team-view.php
[edit]
[-] class-testimonials-view.php
[edit]
[-] class-search-view.php
[edit]
[-] class-heading-view.php
[edit]
[-] class-off-canvas-view.php
[edit]
[-] class-category-list-view.php
[edit]