' . __( 'Read More', 'andre-lite' ) . '', $text ); } else { $excerpt = $text . '' . __( 'Read More', 'andre-lite' ) . ''; } return $excerpt; } } /** * Archives Titles * * @param array $title Configuration arguments. */ function andre_get_the_archive_title( $title ) { 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( _x( 'Y', 'yearly archives date format', 'andre-lite' ) ); } elseif ( is_month() ) { $title = get_the_date( _x( 'F Y', 'monthly archives date format', 'andre-lite' ) ); } elseif ( is_day() ) { $title = get_the_date( _x( 'F j, Y', 'daily archives date format', 'andre-lite' ) ); } elseif ( is_post_type_archive() ) { $title = post_type_archive_title( '', false ); } elseif ( is_tax() ) { $title = single_term_title( '', false ); } else { $title = esc_html__( 'Archives', 'andre-lite' ); } return $title; }; add_filter( 'get_the_archive_title', 'andre_get_the_archive_title', 10, 1 ); /** * Defines new blog excerpt length and link text. * * @param array $item_output Configuration arguments. * @param array $item Configuration arguments. * @param array $depth Configuration arguments. * @param array $args Configuration arguments. */ function andre_nav_description( $item_output, $item, $depth, $args ) { if ( ! empty( $item->description ) ) { $item_output = str_replace( $args->link_after . '', '' . $args->link_after . '', $item_output ); } return $item_output; } add_filter( 'walker_nav_menu_start_el', 'andre_nav_description', 10, 4 ); /** * Skip link function. */ function andre_skip_link() { echo '' . esc_html__( 'Skip to the content', 'andre-lite' ) . ''; } add_action( 'wp_body_open', 'andre_skip_link', 5 ); /** * Display admin notice. */ function andre_notice() { global $current_user; $user_id = $current_user->ID; if ( ! get_user_meta( $user_id, 'andre_notice_ignore' ) ) { echo '
' . esc_html__( 'Thanks for installing Andre Lite! Want more features?', 'andre-lite' ) . '' . esc_html__( 'Check Out the Pro Version →', 'andre-lite' ) . 'Dismiss Notice