', esc_url(get_bloginfo('pingback_url'))); } } add_action('wp_head', 'blogaura_pingback_header'); if (!function_exists('blogaura_get_page_layout')) : /** * Get Page Layout based on the post meta or customizer value * * @return string Page Layout. * @since 1.0.0 * */ function blogaura_get_page_layout() { global $post; $page_layout = ''; // For homepage regardless of static page or latest posts. if (is_front_page() || is_home()) { return blogaura_get_option('sidebar_layout_option'); } // Fetch from Post Meta on single posts or pages. if ($post && is_singular()) { $page_layout = get_post_meta($post->ID, 'blogaura_page_layout', true); if (empty($page_layout) && is_single()) { $page_layout = blogaura_get_option('single_post_layout'); } } // Fetch from customizer if everything else fails. if (empty($page_layout)) { $page_layout = blogaura_get_option('single_sidebar_layout_option'); } return $page_layout; } endif; if (!function_exists('blogaura_load_fonts_url')) : //Google Fonts URL function blogaura_load_fonts_url() { $font_families = array( 'Libre+Caslon+Text:ital,wght@0,400;0,700;1,400', 'Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900', ); $fonts_url = add_query_arg(array( 'family' => implode('&family=', $font_families), 'display' => 'swap', ), 'https://fonts.googleapis.com/css2'); return esc_url_raw($fonts_url); } endif; if (!function_exists('blogaura_placeholder_image')) : /** * Get placeholder image * * @since 1.0.0 */ function blogaura_placeholder_image() { $src = get_template_directory_uri() . '/assets/images/placeholder.webp'; return apply_filters('blogaura_placeholder_image', $src); } endif; if (!function_exists('blogaura_get_archive_excerpt')) : /** * Get archive excerpt * * @return string Page ID. * @since 1.0.0 * */ function blogaura_get_archive_excerpt() { $number_of_word_in_excerpt = blogaura_get_option('number_of_word_in_excerpt', 25); return wp_trim_words(get_the_excerpt(), $number_of_word_in_excerpt, '…'); } endif; if (!function_exists('blogaura_the_archive_excerpt')) : /** * Print archive excerpt * * @return string Page ID. * @since 1.0.0 * */ function blogaura_the_archive_excerpt() { $excerpt_posts_title_limit = blogaura_get_option('excerpt_posts_title_limit'); ?>