get_option( 'preloader' ) === 'on'){ $preloader_type = $bicycleshop_a13->get_option( 'preloader_type' ); $class_attr = $preloader_type; if($bicycleshop_a13->get_option( 'preloader_hide_event' )==='ready'){ $class_attr .= ' onReady'; } ?>
get_option( 'preloader' ) === 'on' ) { $prelaoder_bg_color = bicycleshop_make_css_rule( 'background-color', $bicycleshop_a13->get_option_color_rgba( 'preloader_bg_color' ) ); $prelaoder_bg_image = bicycleshop_make_css_rule( 'background-image', $bicycleshop_a13->get_option_media_url( 'preloader_bg_image' ), 'url(%s)' ); $prelaoder_bg_image_fit = bicycleshop_bg_fit_helper( $bicycleshop_a13->get_option( 'preloader_bg_image_fit' ) ); $css .= " #preloader{ $prelaoder_bg_color $prelaoder_bg_image $prelaoder_bg_image_fit }"; $prelaoder_type = $bicycleshop_a13->get_option( 'preloader_type' ); if ( $prelaoder_type !== 'none' ) { $preloader_css_file = get_theme_file_path( 'css/preloaders/' . $prelaoder_type . '.css' ); $content = bicycleshop_read_contents( $preloader_css_file ); if( $content !== false ){ $prelaoder_color = $bicycleshop_a13->get_option_color_rgba( 'preloader_color' ); $string_to_replace = '#fff/*$color*/'; $css .= str_replace( $string_to_replace, $prelaoder_color, $content ); } } } return $css; } function bicycleshop_page_preloader_partial_css($response) { return bicycleshop_prepare_partial_css($response, 'preloader_bg_image', 'bicycleshop_page_preloader_css'); } add_filter( 'customize_render_partials_response', 'bicycleshop_page_preloader_partial_css' ); if(!function_exists('bicycleshop_preloader_animation_html')){ /** * Prints one of few animations for preloader screen * * @param string $animation name of animation */ function bicycleshop_preloader_animation_html($animation) { switch($animation){ case $animation === 'circle_illusion': ?>
get_option_color_rgba( 'appearance_body_bg_color' ) ); $global_image = bicycleshop_make_css_rule( 'background-image', $bicycleshop_a13->get_option_media_url( 'appearance_body_image' ), 'url(%s)' ); $global_image_fit = bicycleshop_bg_fit_helper( $bicycleshop_a13->get_option( 'appearance_body_image_fit' ) ); $error404_bg_image = bicycleshop_make_css_rule( 'background-image', $bicycleshop_a13->get_option_media_url( 'page_404_bg_image' ), 'url(%s)' ); $password_bg_image = bicycleshop_make_css_rule( 'background-image', $bicycleshop_a13->get_option_media_url( 'page_password_bg_image' ), 'url(%s)' ); $css = " /* backgrounds */ .page-background{ $global_bg_color $global_image $global_image_fit } .default404 .page-background{ $error404_bg_image } "; //single pages if ( $bicycleshop_a13->get_option( 'page_custom_background' ) === 'on' ) { $page_bg_color = bicycleshop_make_css_rule( 'background-color', $bicycleshop_a13->get_option_color_rgba( 'page_body_bg_color' ) ); $page_image = bicycleshop_make_css_rule( 'background-image', $bicycleshop_a13->get_option_media_url( 'page_body_image' ), 'url(%s)' ); $page_image_fit = bicycleshop_bg_fit_helper( $bicycleshop_a13->get_option( 'page_body_image_fit' ) ); $css .= " .page .page-background{ $page_bg_color $page_image $page_image_fit }"; } //blog if ( $bicycleshop_a13->get_option( 'blog_custom_background' ) === 'on' ) { $blog_bg_color = bicycleshop_make_css_rule( 'background-color', $bicycleshop_a13->get_option_color_rgba( 'blog_body_bg_color' ) ); $blog_image = bicycleshop_make_css_rule( 'background-image', $bicycleshop_a13->get_option_media_url( 'blog_body_image' ), 'url(%s)' ); $blog_image_fit = bicycleshop_bg_fit_helper( $bicycleshop_a13->get_option( 'blog_body_image_fit' ) ); $css .= " .single-post .page-background, .posts-list .page-background{ $blog_bg_color $blog_image $blog_image_fit }"; } //shop if ( $bicycleshop_a13->get_option( 'shop_custom_background' ) === 'on' ) { $shop_bg_color = bicycleshop_make_css_rule( 'background-color', $bicycleshop_a13->get_option_color_rgba( 'shop_body_bg_color' ) ); $shop_image = bicycleshop_make_css_rule( 'background-image', $bicycleshop_a13->get_option_media_url( 'shop_body_image' ), 'url(%s)' ); $shop_image_fit = bicycleshop_bg_fit_helper( $bicycleshop_a13->get_option( 'shop_body_image_fit' ) ); $css .= " .woocommerce-page .page-background{ $shop_bg_color $shop_image $shop_image_fit }"; } $css .= " .password-protected .page-background{ $password_bg_image }"; return $css; } function bicycleshop_page_background_partial_css($response) { return bicycleshop_prepare_partial_css($response, 'appearance_body_image', 'bicycleshop_page_background_css'); } add_filter( 'customize_render_partials_response', 'bicycleshop_page_background_partial_css' ); if(!function_exists('bicycleshop_theme_borders')){ /** * Prints theme border if enabled */ function bicycleshop_theme_borders(){ global $bicycleshop_a13; if($bicycleshop_a13->get_option( 'layout_type' ) === 'bordered') { ?>
get_option( 'shop_search' ); $shop_search = $shop_search_option === 'on'; $helper_search = get_search_query() == '' ? true : false; $field_search = ''; $form = '
' . $field_search . ' '.($shop_search? '' : '').' '.($wpml_active? ('') : '').'
'; //next call will have different ID $search_id++; return $form; } } add_filter( 'get_search_form','bicycleshop_search_form' ); if(!function_exists('bicycleshop_get_title_bar')){ /** * Prints Page title bar * * @param string $called_position position of title bar in page * @param string $title title of page * @param string $subtitle subtitle of page * * @return string|void */ function bicycleshop_get_title_bar( $called_position = 'outside', $title = '', $subtitle = '') { global $bicycleshop_a13; $page_type = bicycleshop_what_page_type_is_it(); $home = $page_type['home']; $title_bar_option = 'on'; $tb_classes = ''; $data_attr = ''; $position = 'outside'; $title_bar_variant = 'classic'; $title_bar_width = 'full'; $_subtitle = ''; $has_effect = true; $is_password_protected = post_password_required(); //shop product if($page_type['product']){ $title_bar_option = $bicycleshop_a13->get_option( 'product_title', 'on' ); $position = $bicycleshop_a13->get_option( 'product_title_bar_position', 'inside' ); $title_bar_variant = $bicycleshop_a13->get_option( 'product_title_bar_variant' ); $title_bar_width = $bicycleshop_a13->get_option( 'product_title_bar_width' ); //parallax $parallax = $bicycleshop_a13->get_option( 'product_title_bar_parallax' ) === 'on'; if ( $parallax ) { $parallax_type = $bicycleshop_a13->get_option( 'product_title_bar_parallax_type' ); $parallax_speed = $bicycleshop_a13->get_option( 'shop_title_bar_parallax_speed' ); $tb_classes .= ' a13-parallax'; $data_attr .= ' data-a13-parallax-type="'.esc_attr($parallax_type).'" data-a13-parallax-speed="'.esc_attr((float)$parallax_speed).'"'; } if($title_bar_option === 'off' || $position === 'outside' ){ remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 ); } } //cart and others not sidebar/title pages of woocommerce elseif( ( $page_type['shop'] && !bicycleshop_is_woocommerce_sidebar_page() ) || //wish list ( class_exists( 'YITH_WCWL' ) && (get_the_ID() === (int)yith_wcwl_object_id( get_option( 'yith_wcwl_wishlist_page_id' ) ) ) ) ){ $title_bar_option = $bicycleshop_a13->get_option( 'shop_no_major_pages_title' ); //position is not overwritten $title_bar_variant = $bicycleshop_a13->get_option( 'shop_no_major_pages_title_bar_variant' ); $title_bar_width = $bicycleshop_a13->get_option( 'shop_no_major_pages_title_bar_width' ); //parallax $parallax = $bicycleshop_a13->get_option( 'shop_no_major_pages_title_bar_parallax' ) === 'on'; if ( $parallax ) { $parallax_type = $bicycleshop_a13->get_option( 'shop_no_major_pages_title_bar_parallax_type' ); $parallax_speed = $bicycleshop_a13->get_option( 'shop_title_bar_parallax_speed' ); $tb_classes .= ' a13-parallax'; $data_attr .= ' data-a13-parallax-type="'.esc_attr($parallax_type).'" data-a13-parallax-speed="'.esc_attr((float)$parallax_speed).'"'; } } //shop elseif($page_type['shop']){ $title_bar_option = $bicycleshop_a13->get_option( 'shop_title' ); //position is not overwritten $title_bar_variant = $bicycleshop_a13->get_option( 'shop_title_bar_variant' ); $title_bar_width = $bicycleshop_a13->get_option( 'shop_title_bar_width' ); //parallax $parallax = $bicycleshop_a13->get_option( 'shop_title_bar_parallax' ) === 'on'; if ( $parallax ) { $parallax_type = $bicycleshop_a13->get_option( 'shop_title_bar_parallax_type' ); $parallax_speed = $bicycleshop_a13->get_option( 'shop_title_bar_parallax_speed' ); $tb_classes .= ' a13-parallax'; $data_attr .= ' data-a13-parallax-type="'.esc_attr($parallax_type).'" data-a13-parallax-speed="'.esc_attr((float)$parallax_speed).'"'; } } //blog type elseif($page_type['blog_type']){ $title_bar_option = $bicycleshop_a13->get_option( 'blog_title' ); //position is not overwritten $title_bar_variant = $bicycleshop_a13->get_option( 'blog_title_bar_variant' ); $title_bar_width = $bicycleshop_a13->get_option( 'blog_title_bar_width' ); //parallax $parallax = $bicycleshop_a13->get_option( 'blog_title_bar_parallax' ) === 'on'; if ( $parallax ) { $parallax_type = $bicycleshop_a13->get_option( 'blog_title_bar_parallax_type' ); $parallax_speed = $bicycleshop_a13->get_option( 'blog_title_bar_parallax_speed' ); $tb_classes .= ' a13-parallax'; $data_attr .= ' data-a13-parallax-type="'.esc_attr($parallax_type).'" data-a13-parallax-speed="'.esc_attr((float)$parallax_speed).'"'; } } elseif($is_password_protected){ $position = 'outside'; $title_bar_variant = 'centered'; $has_effect = false; } //attachments page elseif($page_type['attachment']){ $position = 'inside'; } //pages, posts, works elseif($page_type['page'] || $page_type['post']){ $meta_id = get_the_ID(); $_subtitle = $bicycleshop_a13->bicycleshop_get_meta('_subtitle', $meta_id); $title_bar_option = $bicycleshop_a13->bicycleshop_get_meta('_title_bar_settings', $meta_id); //if post was not "edited" yet, then use default settings if($title_bar_option === ''){ $title_bar_option = 'global'; } //three way check which options to apply to title bar if( $title_bar_option === 'global' ){ if( $page_type['page'] ){ $post_type = 'page'; } elseif( $page_type['post'] ){ $post_type = 'post'; } $title_bar_option = $bicycleshop_a13->get_option( $post_type . '_title' ); $position = $bicycleshop_a13->get_option( $post_type . '_title_bar_position' ); $title_bar_variant = $bicycleshop_a13->get_option( $post_type . '_title_bar_variant' ); $title_bar_width = $bicycleshop_a13->get_option( $post_type . '_title_bar_width' ); //parallax $parallax = $bicycleshop_a13->get_option( $post_type.'_title_bar_parallax' ) === 'on'; if ( $parallax ) { $parallax_type = $bicycleshop_a13->get_option( $post_type.'_title_bar_parallax_type' ); $parallax_speed = $bicycleshop_a13->get_option( $post_type.'_title_bar_parallax_speed' ); $tb_classes .= ' a13-parallax'; $data_attr .= ' data-a13-parallax-type="'.esc_attr($parallax_type).'" data-a13-parallax-speed="'.esc_attr((float)$parallax_speed).'"'; } } else{ //use settings from this page $position = $bicycleshop_a13->bicycleshop_get_meta('_title_bar_position', $meta_id); $title_bar_variant = $bicycleshop_a13->bicycleshop_get_meta('_title_bar_variant', $meta_id); $title_bar_width = $bicycleshop_a13->bicycleshop_get_meta('_title_bar_width', $meta_id); $display_breadcrumbs = $bicycleshop_a13->bicycleshop_get_meta('_breadcrumbs', $meta_id) === 'on'; //parallax $parallax = $bicycleshop_a13->bicycleshop_get_meta('_title_bar_parallax', $meta_id) === 'on'; if ( $parallax ) { $parallax_type = $bicycleshop_a13->bicycleshop_get_meta('_title_bar_parallax_type', $meta_id); $parallax_speed = $bicycleshop_a13->bicycleshop_get_meta('_title_bar_parallax_speed', $meta_id); $tb_classes .= ' a13-parallax'; $data_attr .= ' data-a13-parallax-type="'.esc_attr($parallax_type).'" data-a13-parallax-speed="'.esc_attr((float)$parallax_speed).'"'; } } } elseif($page_type['404']){ $position = 'outside'; $display_breadcrumbs = false; $title_bar_variant = 'centered'; } //is it OFF? if(!bicycleshop_is_no_property_page() && !$is_password_protected){ //checks if page can have meta fields if($title_bar_option === 'off'){ return ''; } } //check in which place we called for title bar(inside/outside content) if ( $position !== $called_position ) { if( $called_position === 'outside' ){ return ''; } else{ if($page_type['post']){ //when outside title bar is used, hentry data is outside of container, so we have to provide it other way return '
'.get_the_title().' '.bicycleshop_get_post_meta_data().'
'; } else{ return ''; } } } //subtitle $subtitle = empty($subtitle)? $_subtitle : $subtitle; $subtitle_on = strlen($subtitle); //title bar classes $tb_classes .= $subtitle_on? ' subtitle' : ''; $tb_classes .= ' '.$position; $tb_classes .= $called_position === 'inside' ? '' : ' title_bar_variant_'.$title_bar_variant; $tb_classes .= $called_position === 'inside' ? '' : ' title_bar_width_'.$title_bar_width; $tb_classes .= $has_effect ? ' has-effect' : ''; //if title was not provided if(strlen($title) === 0){ //WooCommerce shop page if(bicycleshop_is_woocommerce_activated() && bicycleshop_is_woocommerce_products_list_page()){ if(is_product_category()){ $title = woocommerce_page_title(false); } else{ $title = get_the_title(wc_get_page_id( 'shop' )); } } //blog elseif ( $home ){ if(get_option('page_for_posts') === '0'){ $title = esc_html__( 'Blog', 'bicycleshop' ); } else{ $title = get_the_title(get_option('page_for_posts')); } } //pages, blog post, etc. else{ $title = get_the_title(); } } $html = ''; if($position === 'inside'){ $html .= bicycleshop_get_top_image_video(false, array('full_size' => true)); //so small images will look good instead of being stretched } $html .= '
'; $post_meta = ''; if($page_type['post'] && !$is_password_protected){ $post_meta = bicycleshop_get_post_meta_data(); } if($title_bar_variant === 'classic' && $called_position === 'outside'){ $html .= '
'; $html .= $post_meta; } else{ $html .= $post_meta; $html .= '
'; } //subtitle if($subtitle_on){ $html .= '

'.$subtitle.'

'; } //main title $html .= '

'.$title.'

';//sometimes we add html here, so don't escape! $html .='
';//.titles $html .='
'; return $html; } } if(!function_exists('bicycleshop_title_bar')){ /** * Prints Page title bar * * @param string $called_position position of title bar in page * @param string $title title of page * @param string $subtitle subtitle of page * */ function bicycleshop_title_bar( $called_position = 'outside', $title = '', $subtitle = '') { //bicycleshop_get_title_bar() produces escaped content echo bicycleshop_get_title_bar( $called_position, $title, $subtitle); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } if(!function_exists('bicycleshop_page_individual_look')){ /** * Prints CSS for title bar */ function bicycleshop_page_individual_look(){ global $bicycleshop_a13; //checks if page can have meta fields //if not page will use styles defined in user.css if(!bicycleshop_is_no_property_page()){ $css = ''; $page_type = bicycleshop_what_page_type_is_it(); $body_class = '.page'; //if this is not page, post or work, then have nothing to do here if(!($page_type['post'] || $page_type['page'])){ return; } //we set style for these in customizer, so we don't use settings from "Page details" if($page_type['shop'] || $page_type['blog_type']){ return; } //id from where $meta_id = false; if($page_type['page']){ $meta_id = get_the_ID(); } elseif($page_type['post']){ $meta_id = get_the_ID(); $body_class = '.single-post'; } //even if it is static currently, let's be safe for future $body_class = wp_strip_all_tags( $body_class ); /***************************************/ /* PAGE BACKGROUND */ /***************************************/ $page_bg_option = $bicycleshop_a13->bicycleshop_get_meta('_page_bg_settings', $meta_id); if($page_bg_option === 'custom'){ $bg_color = wp_strip_all_tags( get_post_meta($meta_id, '_page_bg_color', true) ); $bg_image = wp_strip_all_tags( get_post_meta($meta_id, '_page_image', true) ); $bg_image_fit = wp_strip_all_tags( bicycleshop_bg_fit_helper(get_post_meta($meta_id, '_page_image_fit', true)) ); $css .= ' '.$body_class.' .page-background{ background-color:'.$bg_color.'; background-image: url('.$bg_image.'); '.$bg_image_fit.' } '; } /***************************************/ /* TITLE BAR */ /***************************************/ $title_bar_option = $bicycleshop_a13->bicycleshop_get_meta( '_title_bar_settings', $meta_id ); //change everything if ( $title_bar_option === 'custom' ) { //where title bar should be displayed $position = $bicycleshop_a13->bicycleshop_get_meta( '_title_bar_position', $meta_id ); //we don't style "inside" title bars if ( $position !== 'inside' ) { $bg_color = wp_strip_all_tags( get_post_meta( $meta_id, '_title_bar_bg_color', true ) ); $bg_image = wp_strip_all_tags( bicycleshop_get_top_image_video(false, array('return_src' => true, 'force_image' => true, 'full_size' => true)) ); $bg_fit = wp_strip_all_tags( bicycleshop_bg_fit_helper( get_post_meta( $meta_id, '_title_bar_image_fit', true ) ) ); $title_color = wp_strip_all_tags( get_post_meta( $meta_id, '_title_bar_title_color', true ) ); $second_color = wp_strip_all_tags( get_post_meta( $meta_id, '_title_bar_color_1', true ) ); $space = wp_strip_all_tags( get_post_meta( $meta_id, '_title_bar_space_width', true ) ); $css .= ' ' . $body_class . ' .title-bar.outside{ background-image:url(' . esc_url( $bg_image ) . '); '.$bg_fit.' } ' . $body_class . ' .title-bar.outside .overlay-color{ background-color:' . $bg_color . '; padding-top:' . $space . '; padding-bottom:' . $space . '; } ' . $body_class . ' .title-bar.outside .page-title, ' . $body_class . ' .title-bar.outside h2{ color:' . $title_color . '; } ' . $body_class . ' .title-bar.outside .post-meta, ' . $body_class . ' .title-bar.outside .post-meta a, ' . $body_class . ' .title-bar.outside .post-meta a:hover{ color:' . $second_color . '; } '; } } //change only post thumbnail elseif(($title_bar_option === 'global' || $title_bar_option === '') && has_post_thumbnail()){ //where title bar should be displayed if( $page_type['page'] ){ $post_type = 'page'; } elseif( $page_type['post'] ){ $post_type = 'post'; } $position = $bicycleshop_a13->get_option( $post_type . '_title_bar_position' ); if ( $position !== 'inside' ){ $bg_image = wp_strip_all_tags( bicycleshop_get_top_image_video(false, array('return_src' => true, 'force_image' => true, 'full_size' => true)) ); $css .= ' ' . $body_class . ' .title-bar.outside{ background-image:url(' . esc_url( $bg_image ) . '); } '; } } //if we have some CSS then add it if(strlen($css)){ wp_add_inline_style( 'bicycleshop-a13-user-css', bicycleshop_minify_css($css) ); } } } } add_action( 'wp_enqueue_scripts', 'bicycleshop_page_individual_look', 27 ); if(!function_exists('bicycleshop_social_icons')){ /** * HTML for social icons * * @param string $normal - color of icons for normal state * @param string $hover - color of icons for hover state * @param string $socials_array - array of social icons * @param bool $hide_on_mobile - should icons be hidden on small devices * * @return string HTML * */ function bicycleshop_social_icons($normal, $hover, $socials_array = '', $hide_on_mobile = false ){ global $bicycleshop_a13; //did we send social icons set if( is_array($socials_array) ){ $socials = $socials_array; } //we use socials from theme settings else{ $socials = $bicycleshop_a13->get_option( 'social_services' ); } $classes = 'socials '.$bicycleshop_a13->get_option( 'socials_variant' ); $classes .= ' '.$normal; $classes .= ' '.$hover.'_hover'; $classes .= $hide_on_mobile ? ' hide_on_mobile': ''; $icons_classes = $bicycleshop_a13->bicycleshop_get_social_icons_list('classes'); $icons_names = $bicycleshop_a13->bicycleshop_get_social_icons_list(); $soc_html = ''; $has_active = false; $protocols = wp_allowed_protocols(); $protocols[] = 'skype'; foreach( $socials as $service_id => $service_link ){ if( ! empty($service_link) && $service_id !== '__last_edit' ){ $icon_class = 'a13_soc-'.$service_id.' '.$icons_classes[$service_id]; $soc_html .= ''; $has_active = true; } } if($has_active){ $soc_html = '
'.$soc_html.'
'; } return $soc_html; } } if(!function_exists('bicycleshop_page_like_content')){ /** * prints HTML for some special templates, that use static pages for layout * * @param WP_Query $query */ function bicycleshop_page_like_content($query){ // almost copy of page.php $query->the_post(); //before header to get proper classes of custom template! get_header(); bicycleshop_title_bar(); ?>
>
'') ); ?>
get( 'paged' ) ); $total = $query->found_posts; $last = min( $total, $query->get( 'posts_per_page' ) * $paged ); if ( 1 == $total ) { echo '1/1'; } else { printf( '%1$d/%2$d', esc_html($last), esc_html($total) ); } ?> 'default', // search engine to use (if SearchWP is available) 'input' => array( 'delay' => 500, // wait 500ms before triggering a search 'min_chars' => 3, // wait for at least 3 characters before triggering a search ), 'results' => array( 'position' => 'bottom', // where to position the results (bottom|top) 'width' => 'css', // whether the width should automatically match the input (auto|css) 'offset' => array( 'x' => 0, // x offset (in pixels) 'y' => 0 // y offset (in pixels) ), ), 'spinner' => array( // powered by http://fgnass.github.io/spin.js/ 'lines' => 10, // number of lines in the spinner 'length' => 8, // length of each line 'width' => 4, // line thickness 'radius' => 8, // radius of inner circle 'corners' => 1, // corner roundness (0..1) 'rotate' => 0, // rotation offset 'direction' => 1, // 1: clockwise, -1: counterclockwise 'color' => '#000', // #rgb or #rrggbb or array of colors 'speed' => 1, // rounds per second 'trail' => 60, // afterglow percentage 'shadow' => false, // whether to render a shadow 'hwaccel' => false, // whether to use hardware acceleration 'className' => 'spinner', // CSS class assigned to spinner 'zIndex' => 2000000000, // z-index of spinner 'top' => '50%', // top position (relative to parent) 'left' => '50%', // left position (relative to parent) ), 'results_destroy_on_blur' => false, 'parent_el' => '#search-results-header' ); return $configs; } } add_filter( 'searchwp_live_search_configs', 'bicycleshop_searchwp_live_search_configs' ); if(!function_exists('bicycleshop_remove_searchwp_live_search_theme_css')) { /** * remove the default visual styling of Live Search plugin */ function bicycleshop_remove_searchwp_live_search_theme_css() { wp_dequeue_style( 'searchwp-live-search' ); } } add_action( 'wp_enqueue_scripts', 'bicycleshop_remove_searchwp_live_search_theme_css', 20 ); //disable default results pane positioning CSS add_filter( 'searchwp_live_search_base_styles', '__return_false' ); //prevent SearchWP from automatically enabling live search on forms generated with get_search_form(), add_filter( 'searchwp_live_search_hijack_get_search_form', '__return_false' ); } if(!function_exists('bicycleshop_make_post_grid_filter')) { function bicycleshop_make_post_grid_filter( $terms, $filter_class = '', $selected_term = '__all', $show_all = true ) { if( count( $terms ) ){ echo ''; } } }