$re_order ) : switch( $re_order['value'] ) : case 'site-branding' : ?>
'post', 'post_status' => 'publish', 'posts_per_page' => absint( $main_banner_no_of_posts_to_show ), 'order' => $post_order[1], 'order_by' => $post_order[1], 'ignore_sticky_posts' => true ]; if( isset( $main_banner_post_categories ) ) $post_query_args['cat'] = $post_categories_id_args; if( isset( $main_banner_posts_to_include ) ) $post_query_args['post__in'] = $post_to_include_id_args; if( $hide_posts_with_no_featured_image ) : $post_query_args['meta_query'] = [ [ 'key' => '_thumbnail_id', 'compare' => 'EXISTS' ] ]; endif; $post_query = new \WP_Query( apply_filters( 'blogistic_query_args_filter', $post_query_args ) ); if( $post_query->have_posts() ) : while( $post_query->have_posts() ) : $post_query->the_post(); ?>
', '' ); if( $show_excerpt ) echo '
'. get_the_excerpt() .'
'; ?>
'; break; default: $output = ''; } return $output; } endif; if( ! function_exists( 'blogistic_convert_number_to_numeric_string' )) : /** * Function to convert int parameter to numeric string * MARK: CONVERT NUMBER TO STRING * * @return string */ function blogistic_convert_number_to_numeric_string( $int ) { switch( $int ){ case 2: return "two"; break; case 3: return "three"; break; case 4: return "four"; break; case 5: return "five"; break; case 6: return "six"; break; case 7: return "seven"; break; case 8: return "eight"; break; case 9: return "nine"; break; case 10: return "ten"; break; default: return "one"; } } endif; if( ! function_exists( 'blogistic_post_read_time' ) ) : /** * Function derives the read time * @return float */ function blogistic_post_read_time( $string = '' ) { $read_time = 0; if( empty( $string ) ) { return 0 . esc_html__( ' min', 'blogistic' ); } else { $read_time = apply_filters( 'blogistic_content_read_time', round( str_word_count( wp_strip_all_tags( $string ) ) / 100 ), 2 ); if( $read_time == 0 ) { return 1 . esc_html__( ' min', 'blogistic' ); } else { return $read_time . esc_html__( ' mins', 'blogistic' ); } } } endif; if( ! function_exists( 'blogistic_get_post_categories' ) ) : /** * Function contains post categories html * @return float */ function blogistic_get_post_categories( $post_id, $number = 1, $args = [] ) { $hide_on_mobile = ''; $n_categories = wp_get_post_categories($post_id, array( 'number' => absint( $number ) )); if( array_key_exists( 'hide_on_mobile', $args ) ) : $hide_on_mobile = ( ! $args['hide_on_mobile'] ) ? ' hide-on-mobile' : ''; endif; echo ''; } endif; if( ! function_exists( 'blogistic_loader_html' ) ) : /** * Preloader html * MARK: PRELOADER * * @package Blogistic Pro * @since 1.0.0 */ function blogistic_loader_html() { if( ! BIT\blogistic_get_customizer_option( 'preloader_option' ) ) return; $elementClass = 'blogistic_loading_box preloader-style--three'; ?>
' .wp_kses_post( paginate_links( array( 'prev_text' => '', 'next_text' => '', 'type' => 'list' ) ) ). ''; } } add_action( 'blogistic_pagination_link_hook', 'blogistic_pagination_fnc' ); endif; if( ! function_exists( 'blogistic_scroll_to_top_html' ) ) : /** * Scroll to top fnc * MARK: SCROLL TO TOP * * @package Blogistic Pro * @since 1.0.0 */ function blogistic_scroll_to_top_html() { if( ! BIT\blogistic_get_customizer_option('blogistic_scroll_to_top_option') ) return; $stt_text = BIT\blogistic_get_customizer_option( 'stt_text' ); $stt_icon = BIT\blogistic_get_customizer_option( 'stt_icon' ); $stt_alignment = BIT\blogistic_get_customizer_option( 'stt_alignment' ); $scroll_to_top_mobile_option = BIT\blogistic_get_customizer_option( 'scroll_to_top_mobile_option' ); $classes = 'align--' . $stt_alignment; if( ! $scroll_to_top_mobile_option ) $classes .= ' hide-on-mobile'; ?>
'. apply_filters( 'blogsitic_stt_text_filter', esc_html( $stt_text ) ) .''; } if( $stt_icon['type'] == 'icon' ) { if( $stt_icon['value'] != 'fas fa-ban' ) : echo ''; endif; } else { if( $stt_icon['type'] != 'none' )echo ''. wp_get_attachment_image( $stt_icon['value'], 'full' ) .''; } ?>
'div', 'show_browse' => false ); breadcrumb_trail( $breadcrumb_args ); } add_action( 'blogistic_breadcrumb_trail_hook', 'blogistic_breadcrumb_trail' ); endif; if( ! function_exists( 'blogistic_breadcrumb_html' ) ) : /** * Theme breadcrumb * MARK: BREADCRUMB * * @package Blogistic Pro * @since 1.0.0 */ function blogistic_breadcrumb_html() { $site_breadcrumb_option = BIT\blogistic_get_customizer_option( 'site_breadcrumb_option' ); if ( ! $site_breadcrumb_option ) return; if ( is_front_page() || is_home() ) return; $site_breadcrumb_type = BIT\blogistic_get_customizer_option( 'site_breadcrumb_type' ); ?>
'; break; case 'svg' : echo ''; break; endswitch; } endif; if( ! function_exists( 'blogistic_category_collection_html' ) ) : /** * Category Collection html part * MARK: CATEGORY COLLECTION * * @since 1.0.0 * @package Blogistic Pro */ function blogistic_category_collection_html() { $category_collection_render_in = BIT\blogistic_get_customizer_option( 'category_collection_render_in' ); if( ! BIT\blogistic_get_customizer_option( 'category_collection_option' ) || is_paged() ) : return; elseif( $category_collection_render_in == 'front_page' && ! is_front_page() ) : return; elseif( $category_collection_render_in == 'posts_page' && ! is_home() ) : return; elseif( $category_collection_render_in == 'both' && ( ! is_front_page() && ! is_home() ) ): return; endif; if( ! BIT\blogistic_get_customizer_option( 'category_collection_option' ) ) return; $category_collection_layout = BIT\blogistic_get_customizer_option( 'category_collection_layout' ); $category_collection_show_count = BIT\blogistic_get_customizer_option( 'category_collection_show_count' ); $category_collection_number_of_columns = BIT\blogistic_get_customizer_option( 'category_collection_number_of_columns' ); $category_to_include = BIT\blogistic_get_customizer_option( 'category_to_include' ); $category_to_exclude = BIT\blogistic_get_customizer_option( 'category_to_exclude' ); $category_collection_number = BIT\blogistic_get_customizer_option( 'category_collection_number' ); $category_collection_orderby = BIT\blogistic_get_customizer_option( 'category_collection_orderby' ); $category_collection_sort = explode( '-', $category_collection_orderby ); $category_collection_offset = BIT\blogistic_get_customizer_option( 'category_collection_offset' ); $category_collection_hide_empty = BIT\blogistic_get_customizer_option( 'category_collection_hide_empty' ); $category_collection_slider_option = BIT\blogistic_get_customizer_option( 'category_collection_slider_option' ); $category_collection_image_size = BIT\blogistic_get_customizer_option( 'category_collection_image_size' ); $category_collection_hover_effects = BIT\blogistic_get_customizer_option( 'category_collection_hover_effects' ); $category_collection_box_shadow = blogistic_get_box_shadow_option_class( 'category_collection_box_shadow'); $sectionClass = 'blogistic-category-collection-section'; $sectionClass .= ' layout--' . $category_collection_layout; $sectionClass .= ' hover-effect--' . $category_collection_hover_effects; $sectionClass .= ' column--' . blogistic_convert_number_to_numeric_string( absint( $category_collection_number_of_columns['desktop'] ) ); $sectionClass .= ' tab-column--' . blogistic_convert_number_to_numeric_string( absint( $category_collection_number_of_columns['tablet'] ) ); $sectionClass .= ' mobile-column--' . blogistic_convert_number_to_numeric_string( absint( $category_collection_number_of_columns['smartphone'] ) ); if( $category_collection_box_shadow ) $sectionClass .= $category_collection_box_shadow; if( $category_collection_slider_option ) $sectionClass .= ' slider-enabled'; if( $category_collection_show_count ) $sectionClass .= ' category-count--enabled'; $category_args = [ 'number' => absint( $category_collection_number ), 'exclude' => ( ! empty( $category_to_exclude ) ) ? array_column( json_decode( $category_to_exclude ), 'value' ) : [], 'include' => ( ! empty( $category_to_include ) ) ? array_column( json_decode( $category_to_include ), 'value' ) : [], 'hide_empty' => is_bool( $category_collection_hide_empty ), 'offset' => absint( $category_collection_offset ), 'orderby' => $category_collection_sort[1], 'order' => $category_collection_sort[0] ]; $get_all_categories = get_categories( $category_args ); ?>
$cat_value ) : $category_query_args = [ 'cat' => absint( $cat_value->term_id ), 'meta_query' => [ [ 'key' => '_thumbnail_id', 'compare' => 'EXISTS' ] ], 'ignore_stick_posts' => true ]; $category_query = new WP_Query( apply_filters( 'blogistic_query_args_filter', $category_query_args ) ); if( $category_query->have_posts() ) : $thumbnail_id = ( $category_query->posts[0]->ID != null ) ? $category_query->posts[0]->ID : ''; else: $thumbnail_id = ''; endif; ?>
%3$s', esc_attr( $classes ), esc_url( $link ), ''. esc_html( $text ) .'', esc_attr( $icon ) ) ); } add_action( 'blogistic_section_block_view_all_hook', 'blogistic_button_html', 10, 1 ); endif;