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('asterisk_lite_toggle_duration')): /** * Miscellaneous */ /** * Toggles animation duration in milliseconds. * * @return int Duration in milliseconds */ function asterisk_lite_toggle_duration() { /** * Filters the animation duration/speed used usually for submenu toggles. * * @param int $duration Duration in milliseconds. * @since Twenty Twenty 1.0 * */ $duration = apply_filters('asterisk_lite_toggle_duration', 250); return $duration; } endif; if (!function_exists('asterisk_lite_add_sub_toggles_to_main_menu')): /** * Adds a Sub Nav Toggle to the Expanded Menu and Mobile Menu. * * @param stdClass $args An object of wp_nav_menu() arguments. * @param WP_Post $item Menu item data object. * @param int $depth Depth of menu item. Used for padding. * @return stdClass An object of wp_nav_menu() arguments. */ function asterisk_lite_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 = '
'; $args->after = ''; // Add a toggle to items with children. if (in_array('menu-item-has-children', $item->classes, true)) { $toggle_target_string = '.menu-modal .menu-item-' . $item->ID . ' > .sub-menu'; $toggle_duration = asterisk_lite_toggle_duration(); // Add the sub menu toggle. $args->after .= ''; } // Close the wrapper. $args->after .= '
'; // Add sub menu icons to the primary menu without toggles. } elseif ('asterisk-lite-primary-menu' === $args->theme_location) { if (in_array('menu-item-has-children', $item->classes, true)) { $args->after = ''; } else { $args->after = ''; } } return $args; } endif; add_filter('nav_menu_item_args', 'asterisk_lite_add_sub_toggles_to_main_menu', 10, 3); if (!function_exists('asterisk_lite_sidebar_options')): /** * Sidebars Options **/ function asterisk_lite_sidebar_options($global = true) { $sidebars = array(); $sidebars['right-sidebar'] = esc_html__('Right Sidebar', 'asterisk-lite'); $sidebars['left-sidebar'] = esc_html__('Left Sidebar', 'asterisk-lite'); $sidebars['no-sidebar'] = esc_html__('No Sidebar', 'asterisk-lite'); return $sidebars; } endif; if (!function_exists('asterisk_lite_post_category_list')) : // Post Category List Array. function asterisk_lite_post_category_list() { $post_cat = get_categories( array( 'hide_empty' => '0', 'exclude' => '1', ) ); $post_categories = array(); $post_categories[''] = esc_html__('Select Category', 'asterisk-lite'); foreach ($post_cat as $post_cat) { $post_categories[$post_cat->slug] = $post_cat->name; } return $post_categories; } endif; if (!function_exists('asterisk_lite_social_share')): /** * Social Share **/ function asterisk_lite_social_share() { $asterisk_lite_default = asterisk_lite_get_default_theme_options(); $enable_facebook = get_theme_mod('enable_facebook', $asterisk_lite_default['enable_facebook']); $enable_twitter = get_theme_mod('enable_twitter', $asterisk_lite_default['enable_twitter']); $enable_pinterest = get_theme_mod('enable_pinterest', $asterisk_lite_default['enable_pinterest']); $enable_linkedin = get_theme_mod('enable_linkedin', $asterisk_lite_default['enable_linkedin']); $enable_email = get_theme_mod('enable_email', $asterisk_lite_default['enable_email']); if ($enable_facebook || $enable_twitter || $enable_pinterest || $enable_linkedin || $enable_email) { $permalink = urlencode(get_the_permalink()); $post_title = html_entity_decode(get_the_title(), ENT_COMPAT, 'UTF-8'); $media_url = urlencode(get_the_post_thumbnail_url(get_the_ID(), 'full')); ?>
" target="_blank" class="wedevs-social-share-icon wedevs-share-icon-email">
'avatar-img')); $author_name = esc_html(get_the_author_meta('display_name')); $author_user_url = esc_url(get_the_author_meta('user_url')); $author_description = esc_html(get_the_author_meta('description')); $author_email = esc_html(get_the_author_meta('user_email')); $author_post_url = esc_url(get_author_posts_url(get_the_author_meta('ID'))); $user_data = get_userdata(get_the_author_meta('ID')); $user_role = $user_data->roles[0]; ?>
'post', 'posts_per_page' => 10, ); if ($category) { $array['category_name'] = $category; } $related_posts_query = new WP_Query($array); } else { $current_category = get_the_category($post->ID); $category_array = array(); if ($current_category) { foreach ($current_category as $category) { $category_array[] = $category->term_id; } } $related_posts_query = new WP_Query( array( 'post_type' => 'post', 'posts_per_page' => 10, 'post__not_in' => array($post->ID), 'category__in' => $category_array ) ); } $rtl = ''; if (is_rtl()) { $rtl = 'dir="rtl"'; } if ($related_posts_query->have_posts()): ?>
social_svg_icon) ? $asterisk_lite_social_icon->social_svg_icon : ''; $social_link = isset($asterisk_lite_social_icon->social_link) ? $asterisk_lite_social_icon->social_link : ''; $label = isset($asterisk_lite_social_icon->label) ? $asterisk_lite_social_icon->label : ''; $label_small = strtolower($label); ?>
ID, 'asterisk_lite_post_sidebar_option', true); if ($asterisk_lite_post_sidebar_option == '') { $sidebar = esc_attr($single_sidebar_layout); } else { $sidebar = $asterisk_lite_post_sidebar_option; } } elseif (is_archive() || is_search()) { $archive_sidebar_layout = get_theme_mod('archive_sidebar_layout', $asterisk_lite_default['archive_sidebar_layout']); if ($archive_sidebar_layout == '') { $sidebar = esc_attr($global_sidebar_layout); } else { $sidebar = $archive_sidebar_layout; } } else { $sidebar = $global_sidebar_layout; } $content_column_class = ''; if ($block == 'primary') { $content_column_class = 'site-column-12 site-column-miniwrap'; if ($sidebar == 'right-sidebar') { $content_column_class = 'column-order-1 site-column-9'; } elseif ($sidebar == 'left-sidebar') { $content_column_class = 'column-order-2 site-column-9'; } } if ($block == 'sidebar') { if ($sidebar == 'right-sidebar') { $content_column_class = 'column-order-2 site-column-3'; } elseif ($sidebar == 'left-sidebar') { $content_column_class = 'column-order-1 site-column-3'; } } return $content_column_class; } endif; if (!function_exists('asterisk_lite_single_navigation')) : /** * Single Post Navigation */ function asterisk_lite_single_navigation() { $next_post = get_next_post(); $prev_post = get_previous_post(); ?> term_id; } } $related_posts_query = new WP_Query( array( 'post_type' => 'post', 'posts_per_page' => 4, 'post__not_in' => array($post_id), 'category__in' => $category_array ) ); if ($related_posts_query->have_posts()): ?>

have_posts()): $related_posts_query->the_post(); ?>
>

'post', 'posts_per_page' => 4, 'post__not_in' => get_option("sticky_posts"), 'category_name' => esc_html($asterisk_lite_header_banner_cat))); if ($banner_query->have_posts()): ?>
have_posts()): $banner_query->the_post(); ?>

"; echo esc_html(wp_trim_words(get_the_content(), 20, '...')); echo "

"; } } ?>
term_id) ? $cat_obj->term_id : ''; $wedev_term_image = get_term_meta($cat_id, 'wedevs-term-featured-image', true); $wedev_term_image = wp_get_attachment_image_url($wedev_term_image, 'full'); if (empty($wedev_term_image)) { $wedev_term_image = get_header_image(); } ?>
data-background="" >
', ''); the_archive_description('
', '
'); ?>
data-background="" >

' . get_search_query() . '' ); ?>

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 ) ); ?>
'; breadcrumb_trail(); echo ''; } endif; if (!function_exists('asterisk_lite_footer_credit')) : function asterisk_lite_footer_credit() { ?>