has_header() ) { get_template_part( 'template-parts/header/base' ); } } /** * Header Top Row */ function top_header() { if ( kadence()->display_header_row( 'top' ) ) { kadence()->get_template( 'template-parts/header/header', 'row', array( 'row' => 'top' ) ); } } /** * Header Main Row */ function main_header() { if ( kadence()->display_header_row( 'main' ) ) { kadence()->get_template( 'template-parts/header/header', 'row', array( 'row' => 'main' ) ); } } /** * Header Bottom Row */ function bottom_header() { if ( kadence()->display_header_row( 'bottom' ) ) { kadence()->get_template( 'template-parts/header/header', 'row', array( 'row' => 'bottom' ) ); } } /** * Header Column * * @param string $row the column row. * @param string $column the row column. */ function header_column( $row, $column ) { kadence()->render_header( $row, $column ); } /** * Mobile Header */ function mobile_header() { get_template_part( 'template-parts/header/mobile' ); } /** * Mobile Header Top Row */ function mobile_top_header() { if ( kadence()->display_mobile_header_row( 'top' ) ) { kadence()->get_template( 'template-parts/header/mobile-header', 'row', array( 'mobile_row' => 'top' ) ); } } /** * Mobile Header Main Row */ function mobile_main_header() { if ( kadence()->display_mobile_header_row( 'main' ) ) { kadence()->get_template( 'template-parts/header/mobile-header', 'row', array( 'mobile_row' => 'main' ) ); } } /** * Mobile Header Bottom Row */ function mobile_bottom_header() { if ( kadence()->display_mobile_header_row( 'bottom' ) ) { kadence()->get_template( 'template-parts/header/mobile-header', 'row', array( 'mobile_row' => 'bottom' ) ); } } /** * Mobile Header Column * * @param string $row the header row. * @param string $column the row column. */ function mobile_header_column( $row, $column ) { kadence()->render_header( $row, $column, 'mobile' ); } /** * Header Row Class. * * @param string $row the header row. */ function header_row_class( $row ) { $classes = 'site-' . esc_attr( $row ) . '-header-wrap site-header-row-container site-header-focus-item site-header-row-layout-' . esc_attr( kadence()->sub_option( 'header_' . $row . '_layout', 'desktop' ) ) . esc_attr( kadence()->option( 'header_sticky' ) === $row ? ' kadence-sticky-header' : '' ); return apply_filters( 'kadence-header-row-class-string', $classes ); } /** * Desktop Site Branding */ function site_branding() { $layout = kadence()->option( 'logo_layout' ); $includes = array(); $layouts = array(); if ( is_array( $layout ) && isset( $layout['include'] ) ) { if ( isset( $layout['layout'] ) ) { if ( isset( $layout['layout']['desktop'] ) && ! empty( $layout['layout']['desktop'] ) ) { $layouts['desktop'] = $layout['layout']['desktop']; } } if ( isset( $layout['include']['desktop'] ) && ! empty( $layout['include']['desktop'] ) ) { if ( strpos( $layout['include']['desktop'], 'logo' ) !== false ) { if ( ! in_array( 'logo', $includes, true ) ) { $includes[] = 'logo'; } } if ( strpos( $layout['include']['desktop'], 'title' ) !== false ) { if ( ! in_array( 'title', $includes, true ) ) { $includes[] = 'title'; } } if ( strpos( $layout['include']['desktop'], 'tagline' ) !== false ) { if ( ! in_array( 'tagline', $includes, true ) ) { $includes[] = 'tagline'; } } } } $layout_slug = isset( $layouts['desktop'] ) ? $layouts['desktop'] : 'standard'; if ( 'title_logo' === $layout_slug || 'title_tag_logo' === $layout_slug ) { $layout_class = 'standard-reverse'; } elseif ( 'top_logo_title' === $layout_slug || 'top_logo_title_tag' === $layout_slug ) { $layout_class = 'vertical'; } elseif ( 'top_title_logo' === $layout_slug || 'top_title_tag_logo' === $layout_slug ) { $layout_class = 'vertical-reverse'; } elseif ( 'top_title_logo_tag' === $layout_slug ) { $layout_class = 'vertical site-title-top'; } elseif ( 'standard' === $layout_slug && ! in_array( 'title', $includes, true ) ) { $layout_class = 'standard site-brand-logo-only'; } else { $layout_class = 'standard'; } echo '
'; kadence()->customizer_quick_link(); $has_desktop_tagline_and_logo = in_array( 'tagline', $includes, true ) && ( ! isset( $layouts['desktop'] ) || ( isset( $layouts['desktop'] ) && 'top_title_logo_tag' !== $layouts['desktop'] ) ); echo ''; foreach ( $includes as $include ) { switch ( $include ) { case 'logo': do_action( 'before_kadence_logo_output' ); if ( kadence()->desk_transparent_header() && kadence()->option( 'transparent_header_custom_logo' ) && kadence()->option( 'transparent_header_logo' ) ) { render_custom_logo( 'transparent_header_logo', 'kadence-transparent-logo' ); } else if ( ! kadence()->option( 'custom_logo' ) && kadence()->option( 'use_logo_icon' ) && kadence()->option( 'logo_icon' ) ) { logo_icon(); } else { custom_logo(); } if ( 'no' !== kadence()->option( 'header_sticky' ) && kadence()->option( 'header_sticky_custom_logo' ) && kadence()->option( 'header_sticky_logo' ) ) { render_custom_logo( 'header_sticky_logo', 'kadence-sticky-logo' ); } break; case 'title': echo '
'; echo '

' . get_bloginfo( 'name' ) . '

'; /* phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped */ if ( $has_desktop_tagline_and_logo ) { echo '

' . get_bloginfo( 'description' ) . '

'; /* phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped */ } echo '
'; break; case 'tagline': if ( isset( $layouts['desktop'] ) && 'top_title_logo_tag' === $layouts['desktop'] ) { echo '

' . get_bloginfo( 'description' ) . '

'; /* phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped */ } break; } } echo '
'; echo '
'; } /** * Logo Icon Render */ function logo_icon() { echo ''; $icon = kadence()->option( 'logo_icon' ); if ( 'custom' === $icon ) { echo kadence()->option( 'logo_icon_custom' ); /* phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped */ } else { kadence()->print_icon( $icon, '', false ); } echo ''; } /** * Desktop Navigation */ function primary_navigation() { ?> option( $option_string ); // We have a logo. Logo is go. if ( $custom_logo_id ) { $custom_logo_attr = array( 'class' => 'custom-logo ' . $custom_class, 'loading' => false, ); /* * If the logo alt attribute is empty, get the site title and explicitly * pass it to the attributes used by wp_get_attachment_image(). */ $image_alt = get_post_meta( $custom_logo_id, '_wp_attachment_image_alt', true ); if ( empty( $image_alt ) ) { $custom_logo_attr['alt'] = get_bloginfo( 'name', 'display' ); } $type = get_post_mime_type( $custom_logo_id ); if ( isset( $type ) && 'image/svg+xml' === $type ) { $custom_logo_attr['class'] = 'custom-logo ' . $custom_class . ' svg-logo-image'; } /* * If the alt attribute is not empty, there's no need to explicitly pass * it because wp_get_attachment_image() already adds the alt attribute. */ $html = wp_get_attachment_image( $custom_logo_id, 'full', false, $custom_logo_attr ); } elseif ( is_customize_preview() ) { // If no logo is set but we're in the Customizer, leave a placeholder (needed for the live preview). $html = ''; } /** * Filters the custom logo output. * * @param string $html Custom logo HTML output. * @param string $option_string the ID of the logo option. */ echo apply_filters( 'kadence_extra_custom_logo', $html, $option_string ); /* phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped */ } /** * Output custom logo * * @param integer $blog_id the site ID for multisites. */ function custom_logo( $blog_id = 0 ) { $html = ''; $switched_blog = false; if ( is_multisite() && ! empty( $blog_id ) && get_current_blog_id() !== (int) $blog_id ) { switch_to_blog( $blog_id ); $switched_blog = true; } $custom_logo_id = kadence()->option( 'custom_logo' ); // We have a logo. Logo is go. if ( $custom_logo_id ) { $custom_logo_attr = array( 'class' => 'custom-logo', 'loading' => false, ); /* * If the logo alt attribute is empty, get the site title and explicitly * pass it to the attributes used by wp_get_attachment_image(). */ $image_alt = get_post_meta( $custom_logo_id, '_wp_attachment_image_alt', true ); if ( empty( $image_alt ) ) { $custom_logo_attr['alt'] = get_bloginfo( 'name', 'display' ); } $type = get_post_mime_type( $custom_logo_id ); if ( isset( $type ) && 'image/svg+xml' === $type ) { $custom_logo_attr['class'] = 'custom-logo svg-logo-image'; } /* * If the alt attribute is not empty, there's no need to explicitly pass * it because wp_get_attachment_image() already adds the alt attribute. */ $html = wp_get_attachment_image( $custom_logo_id, 'full', false, $custom_logo_attr ); } elseif ( is_customize_preview() ) { // If no logo is set but we're in the Customizer, leave a placeholder (needed for the live preview). $html = ''; } if ( $switched_blog ) { restore_current_blog(); } /** * Filters the custom logo output. * * @since 4.5.0 * @since 4.6.0 Added the `$blog_id` parameter. * * @param string $html Custom logo HTML output. * @param int $blog_id ID of the blog to get the custom logo for. */ echo apply_filters( 'kadence_custom_logo', $html, $blog_id ); /* phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped */ } /** * Mobile Site Branding */ function mobile_site_branding() { $layout = kadence()->option( 'logo_layout' ); $includes = array(); $layouts = array(); if ( is_array( $layout ) && isset( $layout['include'] ) ) { foreach ( array( 'mobile', 'tablet', 'desktop' ) as $device ) { if ( isset( $layout['layout'] ) ) { if ( isset( $layout['layout'][ $device ] ) && ! empty( $layout['layout'][ $device ] ) ) { $layouts[ $device ] = $layout['layout'][ $device ]; } } // if ( 'desktop' === $device && ! empty( $includes ) ) { // continue; // } if ( isset( $layout['include'][ $device ] ) && ! empty( $layout['include'][ $device ] ) ) { if ( strpos( $layout['include'][ $device ], 'logo' ) !== false ) { if ( ! in_array( 'logo', $includes, true ) ) { $includes[] = 'logo'; } } if ( strpos( $layout['include'][ $device ], 'title' ) !== false ) { if ( ! in_array( 'title', $includes, true ) ) { $includes[] = 'title'; } } if ( strpos( $layout['include'][ $device ], 'tagline' ) !== false ) { if ( ! in_array( 'tagline', $includes, true ) ) { $includes[] = 'tagline'; } } } } } if ( isset( $layouts['tablet'] ) ) { if ( 'title_logo' === $layouts['tablet'] || 'title_tag_logo' === $layouts['tablet'] ) { $tab_layout_class = 'standard-reverse'; } elseif ( 'top_logo_title' === $layouts['tablet'] || 'top_logo_title_tag' === $layouts['tablet'] ) { $tab_layout_class = 'vertical'; } elseif ( 'top_title_logo' === $layouts['tablet'] || 'top_title_tag_logo' === $layouts['tablet'] ) { $tab_layout_class = 'vertical-reverse'; } elseif ( 'top_title_logo_tag' === $layouts['tablet'] ) { $tab_layout_class = 'vertical site-title-top'; } elseif ( 'standard' === $layouts['tablet'] && ! in_array( 'title', $includes, true ) ) { $tab_layout_class = 'standard site-brand-logo-only'; } elseif ( 'standard' === $layouts['tablet'] ) { $tab_layout_class = 'standard'; } else { if ( ! in_array( 'title', $includes, true ) ) { $tab_layout_class = 'inherit site-brand-logo-only'; } else { $tab_layout_class = 'inherit'; } } } else { if ( ! in_array( 'title', $includes, true ) ) { $tab_layout_class = 'inherit site-brand-logo-only'; } else { $tab_layout_class = 'inherit'; } } if ( isset( $layouts['mobile'] ) ) { if ( 'title_logo' === $layouts['mobile'] || 'title_tag_logo' === $layouts['mobile'] ) { $mobile_layout_class = 'standard-reverse'; } elseif ( 'top_logo_title' === $layouts['mobile'] || 'top_logo_title_tag' === $layouts['mobile'] ) { $mobile_layout_class = 'vertical'; } elseif ( 'top_title_logo' === $layouts['mobile'] || 'top_title_tag_logo' === $layouts['mobile'] ) { $mobile_layout_class = 'vertical-reverse'; } elseif ( 'top_title_logo_tag' === $layouts['mobile'] ) { $mobile_layout_class = 'vertical site-title-top'; } elseif ( 'standard' === $layouts['mobile'] && ! in_array( 'title', $includes, true ) ) { $mobile_layout_class = 'standard site-brand-logo-only'; } elseif ( 'standard' === $layouts['mobile'] ) { $mobile_layout_class = 'standard'; } else { $mobile_layout_class = 'inherit'; } } else { $mobile_layout_class = 'inherit'; } $has_mobile_tagline_and_logo = in_array( 'tagline', $includes, true ) && ( ! isset( $layouts['mobile'] ) || ( isset( $layouts['mobile'] ) && 'top_title_logo_tag' !== $layouts['mobile'] ) ); echo '
'; echo ''; foreach ( $includes as $include ) { switch ( $include ) { case 'logo': do_action( 'before_kadence_mobile_logo_output' ); if ( kadence()->mobile_transparent_header() && kadence()->option( 'transparent_header_custom_mobile_logo' ) && kadence()->option( 'transparent_header_mobile_logo' ) ) { render_custom_logo( 'transparent_header_mobile_logo', 'kadence-transparent-logo' ); } elseif ( kadence()->mobile_transparent_header() && kadence()->option( 'transparent_header_custom_logo' ) && kadence()->option( 'transparent_header_logo' ) ) { render_custom_logo( 'transparent_header_logo', 'kadence-transparent-logo' ); } else if ( ! kadence()->option( 'use_mobile_logo' ) && ! kadence()->option( 'custom_logo' ) && kadence()->option( 'use_logo_icon' ) && kadence()->option( 'logo_icon' ) ) { logo_icon(); } else { if ( kadence()->option( 'use_mobile_logo' ) && kadence()->option( 'mobile_logo' ) ) { render_custom_logo( 'mobile_logo' ); } else { custom_logo(); } } if ( 'no' !== kadence()->option( 'mobile_header_sticky' ) && kadence()->option( 'header_sticky_custom_mobile_logo' ) && kadence()->option( 'header_sticky_mobile_logo' ) ) { render_custom_logo( 'header_sticky_mobile_logo', 'kadence-sticky-logo' ); } elseif ( 'no' !== kadence()->option( 'mobile_header_sticky' ) && kadence()->option( 'header_sticky_custom_logo' ) && kadence()->option( 'header_sticky_logo' ) ) { render_custom_logo( 'header_sticky_logo', 'kadence-sticky-logo' ); } break; case 'title': echo '
'; echo '
' . get_bloginfo( 'name' ) . '
'; /* phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped */ if ( $has_mobile_tagline_and_logo ) { echo '
' . get_bloginfo( 'description' ) . '
'; /* phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped */ } echo '
'; break; case 'tagline': if ( isset( $layouts['desktop'] ) && 'top_title_logo_tag' === $layouts['desktop'] ) { echo '
' . get_bloginfo( 'description' ) . '
'; /* phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped */ } break; } } echo '
'; echo '
'; } /** * Mobile Navigation Popup Toggle */ function navigation_popup_toggle() { add_action( 'wp_footer', 'Kadence\navigation_popup' ); ?>
customizer_quick_link(); ?> is_amp() ) { ?>
option( 'mobile_trigger_icon' ); kadence()->print_icon( $icon, '', false ); } /** * Mobile Navigation Popup Toggle */ function navigation_popup() { ?> option( 'header_html_content' ); if ( $content || is_customize_preview() ) { $link_style = kadence()->option( 'header_html_link_style' ); $wpautop = kadence()->option( 'header_html_wpautop' ); echo ''; } } /** * Mobile HTML */ function mobile_html() { $content = kadence()->option( 'mobile_html_content' ); if ( $content || is_customize_preview() ) { $link_style = kadence()->option( 'mobile_html_link_style' ); $wpautop = kadence()->option( 'mobile_html_wpautop' ); echo ''; } } /** * Desktop Button */ function header_button() { $label = kadence()->option( 'header_button_label' ); if ( 'loggedin' === kadence()->option( 'header_button_visibility' ) && ! is_user_logged_in() ) { return; } if ( 'loggedout' === kadence()->option( 'header_button_visibility' ) && is_user_logged_in() ) { return; } if ( $label || is_customize_preview() ) { $wrap_classes = array(); $wrap_classes[] = 'header-button-wrap'; if ( 'loggedin' === kadence()->option( 'header_button_visibility' ) ) { $wrap_classes[] = 'vs-logged-out-false'; } if ( 'loggedout' === kadence()->option( 'header_button_visibility' ) ) { $wrap_classes[] = 'vs-logged-in-false'; } echo '
'; kadence()->customizer_quick_link(); echo '
'; $rel = array(); if ( kadence()->option( 'header_button_target' ) ) { $rel[] = 'noopener'; $rel[] = 'noreferrer'; } if ( kadence()->option( 'header_button_nofollow' ) ) { $rel[] = 'nofollow'; } if ( kadence()->option( 'header_button_sponsored' ) ) { $rel[] = 'sponsored'; } echo 'option( 'header_button_download' ) ) ? ' download' : '' ) . ' class="button header-button button-size-' . esc_attr( kadence()->option( 'header_button_size' ) ) . ' button-style-' . esc_attr( kadence()->option( 'header_button_style' ) ) . '">'; echo esc_html( do_shortcode( $label ) ); echo ''; echo '
'; echo '
'; } } /** * Mobile Button */ function mobile_button() { $label = kadence()->option( 'mobile_button_label' ); if ( 'loggedin' === kadence()->option( 'mobile_button_visibility' ) && ! is_user_logged_in() ) { return; } if ( 'loggedout' === kadence()->option( 'mobile_button_visibility' ) && is_user_logged_in() ) { return; } if ( $label || is_customize_preview() ) { $wrap_classes = array(); $wrap_classes[] = 'mobile-header-button-wrap'; if ( 'loggedin' === kadence()->option( 'mobile_button_visibility' ) ) { $wrap_classes[] = 'vs-logged-out-false'; } if ( 'loggedout' === kadence()->option( 'mobile_button_visibility' ) ) { $wrap_classes[] = 'vs-logged-in-false'; } echo '
'; kadence()->customizer_quick_link(); $rel = array(); if ( kadence()->option( 'mobile_button_target' ) ) { $rel[] = 'noopener'; $rel[] = 'noreferrer'; } if ( kadence()->option( 'mobile_button_nofollow' ) ) { $rel[] = 'nofollow'; } if ( kadence()->option( 'mobile_button_sponsored' ) ) { $rel[] = 'sponsored'; } $classes = array(); $classes[] = 'button'; $classes[] = 'mobile-header-button'; $classes[] = 'button-size-' . esc_attr( kadence()->option( 'mobile_button_size' ) ); $classes[] = 'button-style-' . esc_attr( kadence()->option( 'mobile_button_style' ) ); echo '
'; echo ''; echo esc_html( do_shortcode( $label ) ); echo ''; echo '
'; echo '
'; } } /** * Desktop Cart */ function header_cart() { if ( class_exists( 'woocommerce' ) ) { wp_enqueue_script( 'wc-cart-fragments' ); $label = kadence()->option( 'header_cart_label' ); $show_total = kadence()->option( 'header_cart_show_total' ); $icon = kadence()->option( 'header_cart_icon', 'shopping-bag' ); $dropdown = 'header-navigation nav--toggle-sub header-navigation-dropdown-animation-' . esc_attr( kadence()->option( 'dropdown_navigation_reveal' ) ); echo '
'; kadence()->customizer_quick_link(); $cart_contents_count = ( isset( WC()->cart ) ? WC()->cart->get_cart_contents_count() : 0 ); echo ''; echo '
'; if ( 'link' === kadence()->option( 'header_cart_style' ) ) { echo ''; if ( ! empty( $label ) || is_customize_preview() ) { ?> print_icon( $icon, '', false ); if ( $show_total ) { echo '' . wp_kses_post( $cart_contents_count ) . ''; } echo ''; } elseif ( 'slide' === kadence()->option( 'header_cart_style' ) ) { add_action( 'wp_footer', 'Kadence\cart_popup', 5 ); echo ''; } elseif ( 'dropdown' === kadence()->option( 'header_cart_style' ) ) { echo ''; if ( is_checkout() ) { echo ""; } } echo '
'; echo '
'; } } /** * Cart Popup Toggle */ function cart_popup() { ?> jQuery( document.body ).on( 'removed_from_cart', function() {jQuery(document.body).trigger('update_checkout'); });"; } } /** * Desktop Cart */ function mobile_cart() { if ( class_exists( 'woocommerce' ) ) { wp_enqueue_script( 'wc-cart-fragments' ); $label = kadence()->option( 'header_mobile_cart_label' ); $show_total = kadence()->option( 'header_mobile_cart_show_total' ); $icon = kadence()->option( 'header_mobile_cart_icon', 'shopping-bag' ); echo '
'; kadence()->customizer_quick_link(); $cart_contents_count = ( isset( WC()->cart ) ? WC()->cart->get_cart_contents_count() : 0 ); echo ''; echo '
'; if ( 'link' === kadence()->option( 'header_mobile_cart_style' ) ) { echo ''; if ( ! empty( $label ) || is_customize_preview() ) { ?> print_icon( $icon, '', false ); if ( $show_total ) { echo '' . wp_kses_post( $cart_contents_count ) . ''; } echo ''; } elseif ( 'slide' === kadence()->option( 'header_mobile_cart_style' ) ) { add_action( 'wp_footer', 'Kadence\cart_popup', 5 ); echo ''; } echo '
'; echo '
'; } } /** * Desktop Social */ function header_social() { $items = kadence()->sub_option( 'header_social_items', 'items' ); $show_label = kadence()->option( 'header_social_show_label' ); $brand_colors = kadence()->option( 'header_social_brand' ); $brand_color_class = ''; if ( 'onhover' === $brand_colors ) { $brand_color_class = ' social-show-brand-hover'; } elseif ( 'untilhover' === $brand_colors ) { $brand_color_class = ' social-show-brand-until'; } elseif ( 'always' === $brand_colors ) { $brand_color_class = ' social-show-brand-always'; } echo '
'; kadence()->customizer_quick_link(); echo '
'; if ( is_array( $items ) && ! empty( $items ) ) { foreach ( $items as $item ) { if ( $item['enabled'] ) { $link = kadence()->option( $item['id'] . '_link' ); if ( 'phone' === $item['id'] ) { $link = 'tel:' . str_replace( 'tel:', '', $link ); } elseif ( 'email' === $item['id'] ) { $link = str_replace( 'mailto:', '', $link ); if ( is_email( $link ) ) { $link = 'mailto:' . $link; } } echo ''; if ( 'image' === $item['source'] ) { if ( $item['imageid'] && wp_get_attachment_image( $item['imageid'], 'full', true ) ) { echo wp_get_attachment_image( $item['imageid'], 'full', true, array( 'class' => 'social-icon-image', 'style' => 'max-width:' . esc_attr( $item['width'] ) . 'px' ) ); } elseif ( ! empty( $item['url'] ) ) { echo ''; } } elseif ( 'svg' === $item['source'] ) { if ( ! empty( $item['svg'] ) ) { echo ''; } } else { kadence()->print_icon( $item['icon'], '', false ); } if ( $show_label ) { echo ''; } echo ''; } } } echo '
'; echo '
'; } /** * Mobile Social */ function mobile_social() { $items = kadence()->sub_option( 'header_mobile_social_items', 'items' ); $show_label = kadence()->option( 'header_mobile_social_show_label' ); $brand_colors = kadence()->option( 'header_mobile_social_brand' ); $brand_color_class = ''; if ( 'onhover' === $brand_colors ) { $brand_color_class = ' social-show-brand-hover'; } elseif ( 'untilhover' === $brand_colors ) { $brand_color_class = ' social-show-brand-until'; } elseif ( 'always' === $brand_colors ) { $brand_color_class = ' social-show-brand-always'; } echo '
'; kadence()->customizer_quick_link(); echo '
'; if ( is_array( $items ) && ! empty( $items ) ) { foreach ( $items as $item ) { if ( $item['enabled'] ) { $link = kadence()->option( $item['id'] . '_link' ); if ( 'phone' === $item['id'] ) { $link = 'tel:' . str_replace( 'tel:', '', $link ); } elseif ( 'email' === $item['id'] ) { $link = str_replace( 'mailto:', '', $link ); if ( is_email( $link ) ) { $link = 'mailto:' . $link; } } echo ''; if ( 'image' === $item['source'] ) { if ( $item['imageid'] && wp_get_attachment_image( $item['imageid'], 'full', true ) ) { echo wp_get_attachment_image( $item['imageid'], 'full', true, array( 'class' => 'social-icon-image', 'style' => 'max-width:' . esc_attr( $item['width'] ) . 'px' ) ); } elseif ( ! empty( $item['url'] ) ) { echo ''; } } elseif ( 'svg' === $item['source'] ) { if ( ! empty( $item['svg'] ) ) { echo ''; } } else { kadence()->print_icon( $item['icon'], '', false ); } if ( $show_label ) { echo ''; } echo ''; } } } echo '
'; echo '
'; } /** * Header Search Popup Toggle */ function header_search() { add_action( 'wp_footer', 'Kadence\search_modal', 20 ); ?>
customizer_quick_link(); ?> is_amp() ) { ?>
option( 'header_search_icon' ); kadence()->print_icon( $icon, '', false ); } /** * Search Popup Modal */ function search_modal() { ?>