' . $html . ' '; return $html; } add_filter( 'post_thumbnail_html', 'bestblog_post_image_html', 10, 3 ); /** * Prints categories list. */ if (! function_exists('bestblog_category_list')) : function bestblog_category_list() { $categories = get_the_category(); $separator = ' '; $output = ''; if (! empty($categories)) { foreach ($categories as $category) { $output .= '' . esc_html($category->name) . '' . $separator; } echo trim($output, $separator); } } endif; /** * Prints first category link and name */ if (! function_exists('bestblog_firstcategory_link')) : function bestblog_firstcategory_link() { $categories = get_the_category(); if (! empty($categories)) { echo '' . esc_html($categories[0]->name) . ''; } } endif; if (! function_exists('bestblog_meta_tag')) : /** * Prints HTML with meta information for the tags . */ function bestblog_meta_tag() { // Hide category and tag text for pages. if ('post' === get_post_type()) { /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list(); if ($tags_list) { echo ''; _e('Tagged:', 'best-blog'); echo ''; echo $tags_list; } } } endif; if (! function_exists('bestblog_edit_link')) : /** * Prints HTML with meta information for the tags . */ function bestblog_edit_link() { edit_post_link( sprintf( /* translators: %s: Name of current post */ esc_html__('Edit %s', 'best-blog'), the_title('"', '"', false) ), '' ); } endif; if ( ! function_exists( 'bestblog_time_link' ) ) : /** * Gets a nicely formatted string for the published date. */ function bestblog_time_link() { $time_string = ''; $time_string = sprintf( $time_string, get_the_date( DATE_W3C ), get_the_date(), get_the_modified_date( DATE_W3C ), get_the_modified_date() ); $archive_year = get_the_time('Y'); $archive_month = get_the_time('m'); // Wrap the time string in a link, and preface it with 'Posted on'. return sprintf( /* translators: %s: post date */ __( 'Posted on %s', 'best-blog' ), ' ' . $time_string . '' ); } endif; /** * bestblog gradient color set . */ if (! function_exists('bestblog_gradient_color')) : function bestblog_gradient_color() { $saved_palette = get_theme_mod( 'my_setting', 'crazyorange' ); if ( 'crazyorange' == $saved_palette ) { $background = '#d38312'; $background_gradient = '-webkit-linear-gradient(to right, #d38312, #a83279)'; $background_gradient_sf = 'linear-gradient(to right, #d38312, #a83279)'; } if ( 'endlessriver' == $saved_palette ) { $background = '#43cea2'; $background_gradient = '-webkit-linear-gradient(to right, #43cea2, #185a9d)'; $background_gradient_sf = 'linear-gradient(to right, #43cea2, #185a9d)'; } if ( 'portrait' == $saved_palette ) { $background = '#8e9eab'; $background_gradient = '-webkit-linear-gradient(to bottom, #8e9eab, #eef2f3)'; $background_gradient_sf = 'linear-gradient(to bottom, #8e9eab, #eef2f3)'; } if ( 'piglet' == $saved_palette ) { $background = '#ee9ca7'; $background_gradient = '-webkit-linear-gradient(to bottom, #ee9ca7, #ffdde1)'; $background_gradient_sf = 'linear-gradient(to bottom, #ee9ca7, #ffdde1)'; } if ( 'reef' == $saved_palette ) { $background = '#00d2ff'; $background_gradient = '-webkit-linear-gradient(to top, #00d2ff, #3a7bd5)'; $background_gradient_sf = 'linear-gradient(to top, #00d2ff, #3a7bd5)'; } $styles = "background:{$background}; background:{$background_gradient}; background:{$background_gradient_sf};"; return $styles; } endif; /** * Post page title “Category:”, “Tag:”, “Author:”, “Archives:” and “Other taxonomy name:” */ if (! function_exists('bestblog_getpost_page_title')) : function bestblog_getpost_page_title( $title ) { if ( is_category() ) { $title = single_cat_title( '', false ); } elseif ( is_tag() ) { $title = single_tag_title( '', false ); } elseif ( is_author() ) { $title = $author_bio_avatar_size = apply_filters( 'bestblog_author_bio_avatar_size', 42 ); get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size ); esc_attr__('Posts by ', 'best-blog'); get_the_author(); ; } elseif ( is_archive() ) { $title = the_archive_title( ); } elseif ( is_tax() ) { $title = single_term_title( '', false ); } elseif ( is_search() ) { $bestblog_header_title = sprintf( esc_html__( 'Search Results for: %s', 'best-blog' ), esc_html( get_search_query() ) ); } return $title; } endif; /** * Post page main title “Category:”, “Tag:”, “Author:”, “Archives:” and “Other taxonomy name:” */ if (! function_exists('bestblog_mainpost_page_title')) : function bestblog_mainpost_page_title( ) { echo '

'; echo bestblog_getpost_page_title( $title ); echo'

'; echo'
'; } endif;