' . esc_html($get_description) . '
' . wp_kses_post( $ariele_lite_more_link_text ) . '
'; } endif; /* ----------------------------------------------------------------------------------------------- MOVE READ MORE LINK OUTSIDE OF PARAGRAPHS This moves the more-link outside of the inline paragraph of blog summaries -------------------------------------------------------------------------------------------------- */ if ( ! function_exists( 'ariele_lite_move_more_link' ) ) : function ariele_lite_move_more_link() { $ariele_lite_more_link_text = esc_html( get_theme_mod( 'ariele_lite_more_link_text', __('Read More', 'ariele-lite') ) ); return '' . wp_kses_post( $ariele_lite_more_link_text ) . '
'; } add_filter( 'the_content_more_link', 'ariele_lite_move_more_link' ); endif; /* ----------------------------------------------------------------------------------------------- ARCHIVE TITLE PREFIX Filters the archive title and styles the word before the first colon. --------------------------------------------------------------------------------------------------- */ function ariele_lite_prefix_archive_title( $title ) { $regex = apply_filters( 'ariele_lite_prefix_the_archive_title_regex', array( 'pattern' => '/(\A[^\:]+\:)/', 'replacement' => '$1', ) ); if ( empty( $regex ) ) { return $title; } return preg_replace( $regex['pattern'], $regex['replacement'], $title ); } add_filter( 'get_the_archive_title', 'ariele_lite_prefix_archive_title' ); /* ----------------------------------------------------------------------------------------------- FILTER ARCHIVE TITLE Manage the archive titles --------------------------------------------------------------------------------------------------- */ if( ! function_exists( 'ariele_lite_get_the_archive_title' ) ) : function ariele_lite_get_the_archive_title( $title ) { $ed_prefix = get_theme_mod( 'ariele_lite_prefix_archive', false ); // Use the blog page title on home $blog_page_id = get_option( 'page_for_posts' ); if ( ! is_front_page() && is_home() && $blog_page_id && get_the_title( $blog_page_id ) ) { $title = get_the_title( $blog_page_id ); } elseif( $ed_prefix ){ if( is_category() ){ $title = single_cat_title( '', false ); } elseif ( is_tag() ){ $title = single_tag_title( '', false ); } elseif( is_author() ){ $title = '' . get_the_author() . ''; } elseif ( is_year() ) { $title = get_the_date( __( 'Y', 'ariele-lite' ) ); }elseif ( is_month() ) { $title = get_the_date( __( 'F Y', 'ariele-lite' ) ); } elseif ( is_day() ) { $title = get_the_date( __( 'F j, Y', 'ariele-lite' ) ); } elseif ( is_post_type_archive() && ! is_post_type_archive( 'product' ) ) { $title = post_type_archive_title( '', false ); } elseif ( is_tax() ) { $tax = get_taxonomy( get_queried_object()->taxonomy ); /* translators: 1: Taxonomy singular name, 2: Current taxonomy term */ $title = sprintf( /* translators: %s: Name of title */ esc_html__( '%1$s: %2$s', 'ariele-lite' ), $tax->labels->singular_name, single_term_title( '', false ) ); } } return $title; } endif; add_filter( 'get_the_archive_title', 'ariele_lite_get_the_archive_title' ); /* ----------------------------------------------------------------------------------------------- FILTER ARCHIVE DESCRIPTION The initial description --------------------------------------------------------------------------------------------------- */ if ( ! function_exists( 'ariele_lite_get_the_archive_description' ) ) : function ariele_lite_get_the_archive_description( $description ) { // Use the blog page manual excerpt on home $blog_page_id = get_option( 'page_for_posts' ); if ( is_home() && $blog_page_id && has_excerpt( $blog_page_id ) ) { $description = get_the_excerpt( $blog_page_id ); } return $description; } add_filter( 'get_the_archive_description', 'ariele_lite_get_the_archive_description' ); endif;