', esc_url(get_bloginfo('pingback_url'))); } } add_action('wp_head', 'blognest_pingback_header'); if (!function_exists('blognest_get_page_layout')) : /** * Get Page Layout based on the post meta or customizer value * * @return string Page Layout. * @since 1.0.0 * */ function blognest_get_page_layout() { global $post; $page_layout = ''; // For homepage regardless of static page or latest posts. if (is_front_page() || is_home()) { return blognest_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, 'blognest_page_layout', true); if (empty($page_layout) && is_single()) { $page_layout = blognest_get_option('single_post_layout'); } } // Fetch from customizer if everything else fails. if (empty($page_layout)) { $page_layout = blognest_get_option('single_sidebar_layout_option'); } return $page_layout; } endif; if (!function_exists('blognest_placeholder_image')) : /** * Get placeholder image * * @since 1.0.0 */ function blognest_placeholder_image() { $src = get_template_directory_uri() . '/assets/images/placeholder.webp'; return apply_filters('blognest_placeholder_image', $src); } endif; if (!function_exists('blognest_get_archive_excerpt')) : /** * Get archive excerpt * * @return string Page ID. * @since 1.0.0 * */ function blognest_get_archive_excerpt() { $number_of_word_in_excerpt = blognest_get_option('number_of_word_in_excerpt', 25); return wp_trim_words(get_the_excerpt(), $number_of_word_in_excerpt, '…'); } endif; if (!function_exists('blognest_the_archive_excerpt')) : /** * Print archive excerpt * * @return string Page ID. * @since 1.0.0 * */ function blognest_the_archive_excerpt() { $excerpt_posts_title_limit = blognest_get_option('excerpt_posts_title_limit'); ?>