0) { $excerpt_length = absint($excerpt_length); } return absint($excerpt_length); } endif; add_filter('excerpt_length', 'flash_blog_excerpt_length', 999); if (!function_exists('flash_blog_excerpt_more') ): /** * Implement read more in excerpt. * * @since 1.0.0 * * @param string $more The string shown within the more link. * @return string The excerpt. */ function flash_blog_excerpt_more($more) { if ( is_admin() ) { return $more; } $flag_apply_excerpt_read_more = apply_filters('flash_blog_filter_excerpt_read_more', true); if (true !== $flag_apply_excerpt_read_more) { return $more; } $output = $more; $read_more_text = esc_html(flash_blog_get_option('read_more_button_text')); if (!empty($read_more_text)) { $output = ' '.esc_html($read_more_text).''; $output = apply_filters('flash_blog_filter_read_more_link', $output); } return $output; } add_filter('excerpt_more', 'flash_blog_excerpt_more'); endif; if (!function_exists('flash_blog_posts_navigations')): /** * Posts navigation. * * @since 1.0.0 */ function flash_blog_posts_navigations() { $pagination_type = flash_blog_get_option('pagination_type'); switch ($pagination_type) { case 'default': the_posts_navigation(); break; case 'numeric': the_posts_pagination(); break; default: break; } } endif; add_action('flash_blog_posts_navigation', 'flash_blog_posts_navigations'); function flash_blog_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_post_type_archive() ) { $title = post_type_archive_title( '', false ); } elseif ( is_tax() ) { $title = single_term_title( '', false ); } elseif ( is_date() ) { $title = single_term_title( '', false ); } return $title; } add_filter( 'get_the_archive_title', 'flash_blog_archive_title' );