implode( '&family=', $font_families ), 'display' => 'swap', ), 'https://fonts.googleapis.com/css2' ); return esc_url_raw($fonts_url); } endif; if( !function_exists( 'always_social_menu_icon' ) ) : function always_social_menu_icon( $item_output, $item, $depth, $args ) { // Add Icon if ( 'always-social-menu' === $args->theme_location ) { $svg = Always_SVG_Icons::get_theme_svg_name( $item->url ); if ( empty( $svg ) ) { $svg = always_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', 'always_social_menu_icon', 10, 4 ); if( !function_exists( 'always_add_sub_toggles_to_main_menu' ) ) : function always_add_sub_toggles_to_main_menu( $args, $item, $depth ) { // Add sub menu toggles to the Expanded Menu with toggles. if( isset( $args->show_toggles ) && $args->show_toggles ){ // Wrap the menu item link contents in a div, used for positioning. $args->before = ''; // Add sub menu icons to the primary menu without toggles. }elseif( 'always-primary-menu' === $args->theme_location ){ if( in_array( 'menu-item-has-children', $item->classes, true ) ){ $args->after = ''.always_the_theme_svg('chevron-down',true).''; }else{ $args->after = ''; } } return $args; } endif; add_filter( 'nav_menu_item_args', 'always_add_sub_toggles_to_main_menu', 10, 3 ); if( !function_exists( 'always_sanitize_sidebar_option_meta' ) ) : // Sidebar Option Sanitize. function always_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( 'always_page_lists' ) ) : // Page List. function always_page_lists(){ $page_lists = array(); $page_lists[''] = esc_html__( '-- Select Page --','always' ); $pages = get_pages(); foreach( $pages as $page ){ $page_lists[$page->ID] = $page->post_title; } return $page_lists; } endif; if( !function_exists( 'always_sanitize_post_layout_option_meta' ) ) : // Sidebar Option Sanitize. function always_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( 'always_sanitize_header_overlay_option_meta' ) ) : // Sidebar Option Sanitize. function always_sanitize_header_overlay_option_meta( $input ){ $metabox_options = array( 'global-layout','enable-overlay' ); if( in_array( $input,$metabox_options ) ){ return $input; }else{ return ''; } } endif; /** * Always SVG Icon helper functions * * @package Always * @since 1.0.0 */ if ( ! function_exists( 'always_the_theme_svg' ) ): /** * Output and Get Theme SVG. * Output and get the SVG markup for an icon in the Always_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 always_the_theme_svg( $svg_name, $return = false ) { if( $return ){ return always_get_theme_svg( $svg_name ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in always_get_theme_svg();. }else{ echo always_get_theme_svg( $svg_name ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in always_get_theme_svg();. } } endif; if ( ! function_exists( 'always_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 always_get_theme_svg( $svg_name ) { // Make sure that only our allowed tags and attributes are included. $svg = wp_kses( Always_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( 'always_post_category_list' ) ) : // Post Category List. function always_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 --','always' ); } 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('always_sanitize_meta_pagination') ): /** Sanitize Enable Disable Checkbox **/ function always_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('always_disable_post_views') ): /** Disable Post Views **/ function always_disable_post_views() { add_filter('booster_extension_filter_views_ed', function ( ) { return false; }); } endif; if( !function_exists('always_disable_post_read_time') ): /** Disable Read Time **/ function always_disable_post_read_time() { add_filter('booster_extension_filter_readtime_ed', function ( ) { return false; }); } endif; if( !function_exists('always_disable_post_like_dislike') ): /** Disable Like Dislike **/ function always_disable_post_like_dislike() { add_filter('booster_extension_filter_like_ed', function ( ) { return false; }); } endif; if( !function_exists('always_disable_post_author_box') ): /** Disable Author Box **/ function always_disable_post_author_box() { add_filter('booster_extension_filter_ab_ed', function ( ) { return false; }); } endif; add_filter('booster_extension_filter_ss_ed', function ( ) { return false; }); if( !function_exists('always_disable_post_reaction') ): /** Disable Reaction **/ function always_disable_post_reaction() { add_filter('booster_extension_filter_reaction_ed', function ( ) { return false; }); } endif; if( !function_exists('always_post_floating_nav') ): function always_post_floating_nav(){ $always_default = always_get_default_theme_options(); $ed_floating_next_previous_nav = get_theme_mod( 'ed_floating_next_previous_nav',$always_default['ed_floating_next_previous_nav'] ); if( 'post' === get_post_type() && $ed_floating_next_previous_nav ){ $next_post = get_next_post(); $prev_post = get_previous_post(); if( isset( $prev_post->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', $always_default['twp_navigation_type']); } 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( 'always_navigation_action','always_single_post_navigation',30 ); if ( ! function_exists( 'always_header_toggle_search' ) ): /** * Header Search **/ function always_header_toggle_search() { $always_default = always_get_default_theme_options(); $ed_header_search = get_theme_mod( 'ed_header_search', $always_default['ed_header_search'] ); if( $ed_header_search ){ ?>
'always-social-menu', 'link_before' => '', 'link_after' => '', 'container' => 'div', 'container_class' => 'social-menu', 'depth' => 1, )); ?>
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( class_exists( 'Booster_Extension_Class' ) ){ add_filter('booster_extemsion_content_after_filter','always_after_content_pagination'); } if( !function_exists('always_after_content_pagination') ): function always_after_content_pagination($after_content){ $pagination_single = wp_link_pages( array( 'before' => '', 'echo' => false ) ); $after_content = $pagination_single.$after_content; return $after_content; } endif; if( !function_exists('always_excerpt_content') ): function always_excerpt_content(){ $always_default = always_get_default_theme_options(); $ed_post_excerpt = get_theme_mod( 'ed_post_excerpt',$always_default['ed_post_excerpt'] ); if( $ed_post_excerpt ){ ?>
= $instances ) { break; } } } if ( $blocks_content ) { /** This filter is documented in wp-includes/post-template.php */ echo apply_filters( 'the_content', $blocks_content ); // phpcs:ignore WordPress.Security.EscapeOutput return true; } return false; } if (!function_exists('always_banner_slider_section')): // Single Posts Related Posts. function always_banner_slider_section() { $always_default = always_get_default_theme_options(); $ed_banner_slider_section = get_theme_mod('ed_banner_slider_section', $always_default['ed_banner_slider_section']); $ed_banner_slider_wide_layout_section = get_theme_mod('ed_banner_slider_wide_layout_section', $always_default['ed_banner_slider_wide_layout_section']); if ($ed_banner_slider_section) { $mg_banner_slider_section_cat = get_theme_mod('mg_banner_slider_section_cat'); $ed_banner_slider_autoplay = get_theme_mod('ed_banner_slider_autoplay', $always_default['ed_banner_slider_autoplay']); $ed_banner_slider_arrow = get_theme_mod('ed_banner_slider_arrow', $always_default['ed_banner_slider_arrow']); $ed_banner_slider_dots = get_theme_mod('ed_banner_slider_dots', $always_default['ed_banner_slider_dots']); if ($ed_banner_slider_autoplay) { $autoplay = 'true'; } else { $autoplay = 'false'; } if ($ed_banner_slider_arrow) { $arrow = 'true'; } else { $arrow = 'false'; } if ($ed_banner_slider_dots) { $dots = 'true'; } else { $dots = 'false'; } if (is_rtl()) { $rtl = 'true'; } else { $rtl = 'false'; } $banner_slider_posts_query = new WP_Query(array('post_type' => 'post', 'posts_per_page' => 5, 'category_name' => $mg_banner_slider_section_cat, 'post__not_in' => get_option("sticky_posts"))); if ($banner_slider_posts_query->have_posts()): ?>
have_posts()): $banner_slider_posts_query->the_post(); ?>
'page', 'page_id' => $always_cta_page, ); } $homepage_cta_button_text = get_theme_mod( 'homepage_cta_button_text',$always_default['homepage_cta_button_text'] ); $homepage_cta_button_text_url = get_theme_mod( 'homepage_cta_button_text_url',$always_default['homepage_cta_button_text_url'] ); $cta_link_tab = get_theme_mod( 'cta_link_tab',$always_default['cta_link_tab'] ); $ed_cta_image_overlay = get_theme_mod( 'ed_cta_image_overlay',$always_default['ed_cta_image_overlay'] ); if (!empty($always_cta_page_args)) { $always_cta_page_query = new WP_Query($always_cta_page_args); while ($always_cta_page_query->have_posts()): $always_cta_page_query->the_post(); $url = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full'); $url = isset($url[0]) ? $url[0] : ''; ?>
'page', 'page_id' => $always_about_page, ); } if (!empty($always_about_page_args)) { $always_about_page_query = new WP_Query($always_about_page_args); while ($always_about_page_query->have_posts()): $always_about_page_query->the_post(); if (has_post_thumbnail()) { $url = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full'); $url = isset($url[0]) ? $url[0] : ''; } ?>
data-background="" >
'page', 'page_id' => $page_for_contact, ); } if (!empty($page_for_contact_args)) { $page_for_contact_query = new WP_Query($page_for_contact_args); while ($page_for_contact_query->have_posts()): $page_for_contact_query->the_post(); ?>

'always-social-menu', 'link_before' => '', 'link_after' => '', 'container' => 'div', 'container_class' => 'social-menu', 'depth' => 1, )); ?>

'post', 'posts_per_page' => 4, 'category_name' => $always_related_post_cat, 'post__not_in' => get_option("sticky_posts"))); ?>
have_posts()): ?> have_posts()): $related_posts_query->the_post(); ?>
current_post + 1 == $related_posts_query->post_count) { ?>