implode( '&family=', $font_families ), 'display' => 'swap', ), 'https://fonts.googleapis.com/css2' ); return esc_url_raw($fonts_url); } endif; if( !function_exists('ashlar_read_more_render') ): function ashlar_read_more_render(){ ?>
theme_location ) { $svg = Ashlar_SVG_Icons::get_theme_svg_name( $item->url ); if ( empty( $svg ) ) { $svg = ashlar_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', 'ashlar_social_menu_icon', 10, 4 ); if( !function_exists( 'ashlar_add_sub_toggles_to_main_menu' ) ) : function ashlar_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( 'ashlar-primary-menu' === $args->theme_location ){ if( in_array( 'menu-item-has-children', $item->classes, true ) ){ $args->after = ''.ashlar_the_theme_svg('chevron-down',true).''; }else{ $args->after = ''; } } return $args; } endif; add_filter( 'nav_menu_item_args', 'ashlar_add_sub_toggles_to_main_menu', 10, 3 ); if( !function_exists( 'ashlar_sanitize_sidebar_option_meta' ) ) : // Sidebar Option Sanitize. function ashlar_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( 'ashlar_page_lists' ) ) : // Page List. function ashlar_page_lists(){ $page_lists = array(); $page_lists[''] = esc_html__( '-- Select Page --','ashlar' ); $pages = get_pages(); foreach( $pages as $page ){ $page_lists[$page->ID] = $page->post_title; } return $page_lists; } endif; if( !function_exists( 'ashlar_sanitize_post_layout_option_meta' ) ) : // Sidebar Option Sanitize. function ashlar_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( 'ashlar_sanitize_header_overlay_option_meta' ) ) : // Sidebar Option Sanitize. function ashlar_sanitize_header_overlay_option_meta( $input ){ $metabox_options = array( 'global-layout','enable-overlay' ); if( in_array( $input,$metabox_options ) ){ return $input; }else{ return ''; } } endif; /** * Ashlar SVG Icon helper functions * * @package Ashlar * @since 1.0.0 */ if ( ! function_exists( 'ashlar_the_theme_svg' ) ): /** * Output and Get Theme SVG. * Output and get the SVG markup for an icon in the Ashlar_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 ashlar_the_theme_svg( $svg_name, $return = false ) { if( $return ){ return ashlar_get_theme_svg( $svg_name ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in ashlar_get_theme_svg();. }else{ echo ashlar_get_theme_svg( $svg_name ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in ashlar_get_theme_svg();. } } endif; if ( ! function_exists( 'ashlar_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 ashlar_get_theme_svg( $svg_name ) { // Make sure that only our allowed tags and attributes are included. $svg = wp_kses( Ashlar_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( 'ashlar_post_category_list' ) ) : // Post Category List. function ashlar_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 --','ashlar' ); } 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('ashlar_sanitize_meta_pagination') ): /** Sanitize Enable Disable Checkbox **/ function ashlar_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('ashlar_disable_post_views') ): /** Disable Post Views **/ function ashlar_disable_post_views() { add_filter('booster_extension_filter_views_ed', function ( ) { return false; }); } endif; if( !function_exists('ashlar_disable_post_read_time') ): /** Disable Read Time **/ function ashlar_disable_post_read_time() { add_filter('booster_extension_filter_readtime_ed', function ( ) { return false; }); } endif; if( !function_exists('ashlar_disable_post_like_dislike') ): /** Disable Like Dislike **/ function ashlar_disable_post_like_dislike() { add_filter('booster_extension_filter_like_ed', function ( ) { return false; }); } endif; if( !function_exists('ashlar_disable_post_author_box') ): /** Disable Author Box **/ function ashlar_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('ashlar_disable_post_reaction') ): /** Disable Reaction **/ function ashlar_disable_post_reaction() { add_filter('booster_extension_filter_reaction_ed', function ( ) { return false; }); } endif; if( !function_exists('ashlar_post_floating_nav') ): function ashlar_post_floating_nav(){ $ashlar_default = ashlar_get_default_theme_options(); $ed_floating_next_previous_nav = get_theme_mod( 'ed_floating_next_previous_nav',$ashlar_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', $ashlar_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( 'ashlar_navigation_action','ashlar_single_post_navigation',30 ); if( !function_exists( 'ashlar_header_banner_section' ) ) : function ashlar_header_banner_section(){ $ashlar_default = ashlar_get_default_theme_options(); $ed_header_banner = get_theme_mod( 'ed_header_banner', $ashlar_default['ed_header_banner'] ); if ($ed_header_banner) { $header_banner_title = get_theme_mod( 'header_banner_title',$ashlar_default['header_banner_title'] ); $header_banner_description = get_theme_mod( 'header_banner_description',$ashlar_default['header_banner_description'] ); $header_banner_title_link = get_theme_mod( 'header_banner_title_link',$ashlar_default['header_banner_title_link'] ); $header_button_title = get_theme_mod( 'header_button_title',$ashlar_default['header_button_title'] ); $header_image_url = get_header_image() ?>
'post', 'posts_per_page' => 10,'category_name' => $mg_carousel_section_cat,'post__not_in' => get_option("sticky_posts") ) ); if( $carousel_posts_query->have_posts() ): ?>
'ashlar-social-menu', 'link_before' => '', 'link_after' => '', 'container' => 'div', 'container_class' => 'social-menu', 'depth' => 1, )); ?>
'); ?> '); ?> array( 'background_color' => '#ffffff', 'ashlar_primary_color' => $ashlar_default['ashlar_primary_color'], 'ashlar_secondary_color' => $ashlar_default['ashlar_secondary_color'], 'ashlar_general_color' => $ashlar_default['ashlar_general_color'], ), 'dark' => array( 'background_color' => '#222222', 'ashlar_primary_color' => $ashlar_default['ashlar_primary_color_dark'], 'ashlar_secondary_color' => $ashlar_default['ashlar_secondary_color_dark'], 'ashlar_general_color' => $ashlar_default['ashlar_general_color_dark'], ), 'fancy' => array( 'background_color' => '#faf7f2', 'ashlar_primary_color' => $ashlar_default['ashlar_primary_color_fancy'], 'ashlar_secondary_color' => $ashlar_default['ashlar_secondary_color_fancy'], 'ashlar_general_color' => $ashlar_default['ashlar_general_color_fancy'], ), ); if( isset( $colors_schema[$current_color] ) ){ return $colors_schema[$current_color]; } return; } endif; if ( ! function_exists( 'ashlar_color_schema_color_action' ) ) : function ashlar_color_schema_color_action() { if( isset( $_POST['currentColor'] ) && sanitize_text_field( wp_unslash( $_POST['currentColor'] ) ) ){ $current_color = sanitize_text_field( wp_unslash( $_POST['currentColor'] ) ); $color_schemes = ashlar_color_schema_color( $current_color ); if ( $color_schemes ) { echo json_encode( $color_schemes ); } } wp_die(); } endif; add_action( 'wp_ajax_nopriv_ashlar_color_schema_color', 'ashlar_color_schema_color_action' ); add_action( 'wp_ajax_ashlar_color_schema_color', 'ashlar_color_schema_color_action' ); if( ! function_exists( 'ashlar_iframe_escape' ) ): /** Escape Iframe **/ function ashlar_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( class_exists( 'Booster_Extension_Class' ) ){ add_filter('booster_extemsion_content_after_filter','ashlar_after_content_pagination'); } if( !function_exists('ashlar_after_content_pagination') ): function ashlar_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('ashlar_excerpt_content') ): function ashlar_excerpt_content(){ $ashlar_default = ashlar_get_default_theme_options(); $ed_post_excerpt = get_theme_mod( 'ed_post_excerpt',$ashlar_default['ed_post_excerpt'] ); if( $ed_post_excerpt ){ ?>
>
<?php the_title_attribute(); ?>

'; echo esc_html( wp_trim_words( get_the_content(),25,'...' ) ); echo '

'; } ?>
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( 'ashlar_render_category_filter' ) ): function ashlar_render_category_filter( ) { $ashlar_default = ashlar_get_default_theme_options(); $ed_post_filter = get_theme_mod('ed_post_filter',$ashlar_default['ed_post_filter'] ); $ashlar_post_category_list = ashlar_post_category_list(false); ?>
  • $category) { if ($category) { ?>