'; if ( count( $cats ) > 0 ) { foreach( $cats as $key => $cat ) { $attr = ''; if( $s_cat_slug == $key ){ $attr = 'selected'; } echo ''; } } echo ''; ?>
implode( '&family=', $font_families ), 'display' => 'swap', ), 'https://fonts.googleapis.com/css2' ); return esc_url_raw($fonts_url); } endif; if( !function_exists( 'primebulletin_sanitize_sidebar_option_meta' ) ) : // Sidebar Option Sanitize. function primebulletin_sanitize_sidebar_option_meta( $input ){ $metabox_options = array( 'global-sidebar','left-sidebar','right-sidebar','no-sidebar' ); if( in_array( $input,$metabox_options ) ){ return $input; }else{ return ''; } } endif; if( !function_exists( 'primebulletin_page_lists' ) ) : // Page List. function primebulletin_page_lists(){ $page_lists = array(); $page_lists[''] = esc_html__( '-- Select Page --','primebulletin' ); $pages = get_pages( array ( 'parent' => 0, // replaces 'depth' => 1, ) ); foreach( $pages as $page ){ $page_lists[$page->ID] = $page->post_title; } return $page_lists; } endif; if( !function_exists( 'primebulletin_sanitize_post_layout_option_meta' ) ) : // Sidebar Option Sanitize. function primebulletin_sanitize_post_layout_option_meta( $input ){ $metabox_options = array( 'global-layout','layout-1','layout-2' ); if( in_array( $input,$metabox_options ) ){ return $input; }else{ return ''; } } endif; if( !function_exists( 'primebulletin_sanitize_header_overlay_option_meta' ) ) : // Sidebar Option Sanitize. function primebulletin_sanitize_header_overlay_option_meta( $input ){ $metabox_options = array( 'global-layout','enable-overlay' ); if( in_array( $input,$metabox_options ) ){ return $input; }else{ return ''; } } endif; /** * PrimeBulletin SVG Icon helper functions * * @package PrimeBulletin * @since 1.0.0 */ if ( ! function_exists( 'primebulletin_the_theme_svg' ) ): /** * Output and Get Theme SVG. * Output and get the SVG markup for an icon in the PrimeBulletin_SVG_Icons class. * * @param string $svg_name The name of the icon. * @param string $group The group the icon belongs to. * @param string $color Color code. */ function primebulletin_the_theme_svg( $svg_name, $return = false ) { if( $return ){ return primebulletin_get_theme_svg( $svg_name ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in primebulletin_get_theme_svg();. }else{ echo primebulletin_get_theme_svg( $svg_name ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in primebulletin_get_theme_svg();. } } endif; if ( ! function_exists( 'primebulletin_get_theme_svg' ) ): /** * Get information about the SVG icon. * * @param string $svg_name The name of the icon. * @param string $group The group the icon belongs to. * @param string $color Color code. */ function primebulletin_get_theme_svg( $svg_name ) { // Make sure that only our allowed tags and attributes are included. $svg = wp_kses( PrimeBulletin_SVG_Icons::get_svg( $svg_name ), array( 'svg' => array( 'class' => true, 'xmlns' => true, 'width' => true, 'height' => true, 'viewbox' => true, 'aria-hidden' => true, 'role' => true, 'focusable' => true, ), 'path' => array( 'fill' => true, 'fill-rule' => true, 'd' => true, 'transform' => true, ), 'polygon' => array( 'fill' => true, 'fill-rule' => true, 'points' => true, 'transform' => true, 'focusable' => true, ), ) ); if ( ! $svg ) { return false; } return $svg; } endif; if ( ! function_exists( 'primebulletin_svg_escape' ) ): /** * Get information about the SVG icon. * * @param string $svg_name The name of the icon. * @param string $group The group the icon belongs to. * @param string $color Color code. */ function primebulletin_svg_escape( $input ) { // Make sure that only our allowed tags and attributes are included. $svg = wp_kses( $input, array( 'svg' => array( 'class' => true, 'xmlns' => true, 'width' => true, 'height' => true, 'viewbox' => true, 'aria-hidden' => true, 'role' => true, 'focusable' => true, ), 'path' => array( 'fill' => true, 'fill-rule' => true, 'd' => true, 'transform' => true, ), 'polygon' => array( 'fill' => true, 'fill-rule' => true, 'points' => true, 'transform' => true, 'focusable' => true, ), ) ); if ( ! $svg ) { return false; } return $svg; } endif; if( !function_exists('primebulletin_post_format_icon') ): // Post Format Icon. function primebulletin_post_format_icon( $format ){ if( $format == 'video' ){ $icon = primebulletin_get_theme_svg( 'video' ); }elseif( $format == 'audio' ){ $icon = primebulletin_get_theme_svg( 'audio' ); }elseif( $format == 'gallery' ){ $icon = primebulletin_get_theme_svg( 'gallery' ); }elseif( $format == 'quote' ){ $icon = primebulletin_get_theme_svg( 'quote' ); }elseif( $format == 'image' ){ $icon = primebulletin_get_theme_svg( 'image' ); }else{ $icon = ''; } return $icon; } endif; if( !function_exists( 'primebulletin_social_menu_icon' ) ) : function primebulletin_social_menu_icon( $item_output, $item, $depth, $args ) { // Add Icon if ( isset( $args->theme_location ) && 'primebulletin-social-menu' === $args->theme_location ) { $svg = PrimeBulletin_SVG_Icons::get_theme_svg_name( $item->url ); if ( empty( $svg ) ) { $svg = primebulletin_the_theme_svg( 'link',$return = true ); } $item_output = str_replace( $args->link_after, '' . $svg, $item_output ); } return $item_output; } endif; add_filter( 'walker_nav_menu_start_el', 'primebulletin_social_menu_icon', 10, 4 ); if ( ! function_exists( 'primebulletin_sub_menu_toggle_button' ) ) : function primebulletin_sub_menu_toggle_button( $args, $item, $depth ) { // Add sub menu toggles to the main menu with toggles if ( $args->theme_location == 'primebulletin-primary-menu' && isset( $args->show_toggles ) ) { // Wrap the menu item link contents in a div, used for positioning $args->before = ''; // Add sub menu icons to the main menu without toggles (the fallback menu) } elseif ( $args->theme_location == 'primebulletin-primary-menu' ) { if ( in_array( 'menu-item-has-children', $item->classes ) ) { $args->before = ''; } else { $args->before = ''; $args->after = ''; } } return $args; } add_filter( 'nav_menu_item_args', 'primebulletin_sub_menu_toggle_button', 10, 3 ); endif; if( !function_exists( 'primebulletin_post_category_list' ) ) : // Post Category List. function primebulletin_post_category_list( $select_cat = true ){ $post_cat_lists = get_categories( array( 'hide_empty' => '0', 'exclude' => '1', ) ); $post_cat_cat_array = array(); if( $select_cat ){ $post_cat_cat_array[''] = esc_html__( 'Select Category','primebulletin' ); } foreach ( $post_cat_lists as $post_cat_list ) { $post_cat_cat_array[$post_cat_list->slug] = $post_cat_list->name; } return $post_cat_cat_array; } endif; if( !function_exists('primebulletin_sanitize_meta_pagination') ): /** Sanitize Enable Disable Checkbox **/ function primebulletin_sanitize_meta_pagination( $input ) { $valid_keys = array('global-layout','no-navigation','norma-navigation','ajax-next-post-load'); if ( in_array( $input , $valid_keys ) ) { return $input; } return ''; } endif; if( !function_exists('primebulletin_disable_post_views') ): /** Disable Post Views **/ function primebulletin_disable_post_views() { add_filter('booster_extension_filter_views_ed', 'primebulletin_disable_views_ed'); } endif; if( !function_exists('primebulletin_disable_views_ed') ): /** Disable Reaction **/ function primebulletin_disable_views_ed() { return false; } endif; if( !function_exists('primebulletin_disable_post_read_time') ): /** Disable Read Time **/ function primebulletin_disable_post_read_time() { add_filter('booster_extension_filter_readtime_ed', 'primebulletin_disable_read_time'); } endif; if( !function_exists('primebulletin_disable_read_time') ): /** Disable Reaction **/ function primebulletin_disable_read_time() { return false; } endif; if( !function_exists('primebulletin_disable_post_like_dislike') ): /** Disable Like Dislike **/ function primebulletin_disable_post_like_dislike() { add_filter('booster_extension_filter_like_ed', 'primebulletin_disable_like_ed'); } endif; if( !function_exists('primebulletin_disable_like_ed') ): /** Disable Reaction **/ function primebulletin_disable_like_ed() { return false; } endif; if( !function_exists('primebulletin_disable_post_author_box') ): /** Disable Author Box **/ function primebulletin_disable_post_author_box() { add_filter('booster_extension_filter_ab_ed','primebulletin_disable_ab_ed'); } endif; if( !function_exists('primebulletin_disable_ab_ed') ): /** Disable Reaction **/ function primebulletin_disable_ab_ed() { return false; } endif; add_filter('booster_extension_filter_ss_ed', 'primebulletin_disable_social_share'); if( !function_exists('primebulletin_disable_social_share') ): /** Disable Reaction **/ function primebulletin_disable_social_share() { return false; } endif; if( !function_exists('primebulletin_disable_post_reaction') ): /** Disable Reaction **/ function primebulletin_disable_post_reaction() { add_filter('booster_extension_filter_reaction_ed', 'primebulletin_disable_reaction_cb'); } endif; if( !function_exists('primebulletin_disable_reaction_cb') ): /** Disable Reaction **/ function primebulletin_disable_reaction_cb() { return false; } endif; if( !function_exists( 'primebulletin_header_ad' ) ): function primebulletin_header_ad(){ $primebulletin_default = primebulletin_get_default_theme_options(); $ed_header_ad = get_theme_mod( 'ed_header_ad',$primebulletin_default['ed_header_ad'] ); $header_ad_image = get_theme_mod( 'header_ad_image' ); $ed_header_link = get_theme_mod( 'ed_header_link' ); if( $ed_header_ad ){ ?>
ID ) ){ $prev_link = get_permalink( $prev_post->ID );?>
ID,'medium' ) ){ ?> ID,'medium' ) ); ?> ID ) ); ?>
ID ) ){ $next_link = get_permalink( $next_post->ID );?>
ID,'medium' ) ){ ?> ID,'medium' ) ); ?> ID ) ); ?>
ID; if( $twp_navigation_type == '' || $twp_navigation_type == 'global-layout' ){ $twp_navigation_type = get_theme_mod('twp_navigation_type', $primebulletin_default['twp_navigation_type']); } if( $primebulletin_header_trending_page != $current_id && $primebulletin_header_popular_page != $current_id ){ if( $twp_navigation_type != 'no-navigation' && 'post' === get_post_type() ){ if( $twp_navigation_type == 'norma-navigation' ){ ?> ID ) ){ $next_post_id = $next_post->ID; echo '
'; } } } } } endif; add_action( 'primebulletin_navigation_action','primebulletin_single_post_navigation',30 ); if( !function_exists('primebulletin_header_banner') ): function primebulletin_header_banner(){ global $post; if( have_posts() ): while (have_posts()) : the_post(); global $post; endwhile; endif; $primebulletin_post_layout = ''; $primebulletin_default = primebulletin_get_default_theme_options(); if( is_singular() ){ $primebulletin_post_layout = esc_html( get_post_meta( $post->ID, 'primebulletin_post_layout', true ) ); if( $primebulletin_post_layout == '' || $primebulletin_post_layout == 'global-layout' ){ $primebulletin_post_layout = get_theme_mod( 'primebulletin_single_post_layout',$primebulletin_default['primebulletin_archive_layout'] ); } } if( isset( $post->ID ) ){ $primebulletin_page_layout = esc_html( get_post_meta( $post->ID, 'primebulletin_page_layout', true ) ); } if( $primebulletin_post_layout == 'layout-2' && is_singular('post') ) { if ( have_posts() ) : while ( have_posts() ) : the_post(); $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(),'full' ); $primebulletin_ed_feature_image = esc_html( get_post_meta( get_the_ID(), 'primebulletin_ed_feature_image', true ) ); ?>
'primebulletin-social-menu', 'link_before' => '', 'link_after' => '', 'container' => 'div', 'container_class' => 'primebulletin-social-menu', 'depth' => 1, ) ); ?>
'primebulletin-social-menu', 'link_before' => '', 'link_after' => '', 'container' => 'div', 'container_class' => 'primebulletin-social-menu', 'depth' => 1, ) ); ?>
'post', 'posts_per_page' => 9, 'post__not_in' => get_option("sticky_posts"), 'category_name' => $primebulletin_header_trending_cat, ) ); if( $trending_news_query->have_posts() ): ?>
'); ?> '); ?>
'post', 'posts_per_page' => 3, 'post__not_in' => get_option("sticky_posts"), 'category_name' => esc_html( $category ), 'post_status' => 'publish' ) ); $tab_post_query_1 = new WP_Query( array( 'post_type' => 'post', 'posts_per_page' => 3, 'post__not_in' => get_option("sticky_posts"), 'category_name' => esc_html( $category ), 'post_status' => 'publish' ) ); if( $tab_post_query ->have_posts() ): ?>
have_posts()) { $tab_post_query_1->the_post(); $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'medium' ); $featured_image = isset( $featured_image[0] ) ? $featured_image[0] : ''; ?>
>

'post', 'posts_per_page' => 10, 'post__not_in' => get_option("sticky_posts"), 'category_name' => esc_html($primebulletin_header_ticker_cat))); if( $ticker_posts_query->have_posts() ): ?>
have_posts()): $ticker_posts_query->the_post(); $featured_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'medium'); $featured_image = isset( $featured_image[0] ) ? $featured_image[0] : ''; ?>
>

'; echo '
'; } endif; if( !function_exists('primebulletin_woo_after_main_content') ): function primebulletin_woo_after_main_content(){ $primebulletin_default = primebulletin_get_default_theme_options(); $sidebar = esc_attr( get_theme_mod( 'global_sidebar_layout', $primebulletin_default['global_sidebar_layout'] ) ); if( $sidebar != 'no-sidebar' ){ get_sidebar(); } echo '
'; echo ''; } endif; if( !function_exists('primebulletin_content_loading') ){ function primebulletin_content_loading(){ ?>
'', 'echo' => false ) ); $after_content = $pagination_single.$after_content; return $after_content; } endif; if( ! function_exists( 'primebulletin_iframe_escape' ) ): /** Escape Iframe **/ function primebulletin_iframe_escape( $input ){ $all_tags = array( 'iframe'=>array( 'width'=>array(), 'height'=>array(), 'src'=>array(), 'frameborder'=>array(), 'allow'=>array(), 'allowfullscreen'=>array(), ), 'video'=>array( 'width'=>array(), 'height'=>array(), 'src'=>array(), 'style'=>array(), 'controls'=>array(), ) ); return wp_kses($input,$all_tags); } endif; if( ! function_exists( 'primebulletin_post_permalink' ) ): function primebulletin_post_permalink(){ ?>
esc_html__( 'Global', 'primebulletin' ), 'default' => esc_html__( 'Default', 'primebulletin' ), 'square' => esc_html__( 'Square', 'primebulletin' ), 'portrait' => esc_html__( 'Portrait', 'primebulletin' ), 'landscape' => esc_html__( 'Landscape', 'primebulletin' ), ); } endif; if( !function_exists('primebulletin_video_autoplay') ): function primebulletin_video_autoplay(){ return $primebulletin_video_autoplay = array( 'global' => esc_html__( 'Global', 'primebulletin' ), 'autoplay-disable' => esc_html__( 'Disable Autoplay', 'primebulletin' ), 'autoplay-enable' => esc_html__( 'Enable Autoplay', 'primebulletin' ), ); } endif; add_filter('comment_form_defaults','primebulletin_comment_title_callback'); if( !function_exists('primebulletin_comment_title_callback') ): function primebulletin_comment_title_callback($defaults){ $defaults['title_reply_before'] = '

'; $defaults['title_reply_after'] = '

'; return $defaults; } endif; if( class_exists('Booster_Extension_Class') ): add_filter('booster_extension_ed_content','primebulletin_read_letter_content_false'); if( !function_exists('primebulletin_read_letter_content_false') ): function primebulletin_read_letter_content_false(){ return false; } endif; add_action('booster_extension_read_later_post_content','primebulletin_readletter_content',20); if( !function_exists('primebulletin_readletter_content') ): function primebulletin_readletter_content(){ return get_template_part( 'template-parts/content', get_post_format() ); } endif; endif; if( !function_exists('primebulletin_category_pin_posts_link') ): function primebulletin_category_pin_posts_link(){ $primebulletin_default = primebulletin_get_default_theme_options(); $ed_post_read_later = get_theme_mod('ed_post_read_later',$primebulletin_default['ed_post_read_later']); if ( $ed_post_read_later && class_exists('Booster_Extension_Class') ): if( function_exists('booster_extension_get_read_letter_page_id') ){ $page_id = booster_extension_get_read_letter_page_id(); if ($page_id) { $page_link = get_page_link($page_id); ?>