%s', esc_url(get_permalink( $pid )), esc_attr( get_the_title( $pid ) ), $html ); } return $html; } add_filter( 'post_thumbnail_html', 'azeen_filter_post_thumbnail_html', 10, 5 ); /** * comments meta */ if (! function_exists('azeen_meta_comment')) : function azeen_meta_comment() { if (! post_password_required() && (comments_open() || get_comments_number())) { echo ''; /* translators: %s: post title */ comments_popup_link(sprintf(wp_kses(__('Leave a Comment on %s', 'azeen'), array( 'span' => array( 'class' => array() ) )), get_the_title())); echo ''; } } endif; /** * Prints categories list. */ if (! function_exists('azeen_category_list')) : function azeen_category_list() { $categories = get_the_category(); $output = ''; if (is_single()) { $separator = ''; if (! empty($categories)) { foreach ($categories as $category) { $output .= '' . esc_html($category->name) . '' . $separator; } } } else { $separator = ''; if (! empty($categories)) { foreach ($categories as $category) { $output .= '' . esc_html($category->name) . '' . $separator; } } } echo trim($output, $separator); } endif; // Print categories for widgets if (! function_exists('azeen_category_widgtesmission')) : function azeen_category_widgtesmission() { $categories = get_the_category(); $output = ''; $separator = ''; if (! empty($categories)) { foreach ($categories as $category) { $output .= '' . esc_html($category->name) . '' . $separator; } } echo trim($output, $separator); } endif; if (! function_exists('azeen_meta_tag')) : /** * Prints HTML with meta information for the tags . */ function azeen_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:', 'azeen'); echo ''; echo $tags_list; } } } endif; if (! function_exists('azeen_edit_link')) : /** * Prints HTML with meta information for the tags . */ function azeen_edit_link() { edit_post_link( sprintf( /* translators: %s: Name of current post */ esc_html__('Edit %s', 'azeen'), the_title('"', '"', false) ), '' ); } endif; if (! function_exists('azeen_time_link')) : /** * Gets a nicely formatted string for the published date. */ function azeen_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 */ __(' %s', 'azeen'), ' ' . $time_string . '' ); } endif; /* Function which displays your post date in time ago format */ function azeen_time_ago() { return human_time_diff( get_the_time( 'U' ), current_time( 'timestamp' ) ).' '.esc_html__( 'ago','azeen' ); } if (! function_exists('azeen_author_bio')) : function azeen_author_bio() { // Post meta author $author = sprintf( esc_html_x('Posts by: %s', 'post author', 'azeen'), esc_html(get_the_author()) ); echo $author ; } endif; function azeen_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 ); } return $title; } add_filter( 'get_the_archive_title', 'azeen_archive_title' ); /** * Post page title “Category:”, “Tag:”, “Author:”, “Archives:” and “Other taxonomy name:” */ if (! function_exists('azeen_getpost_page_title')) : function azeen_getpost_page_title() { if (is_category()) { $title = single_cat_title('', false); } elseif (is_tag()) { $title = single_tag_title('', false); } elseif (is_author()) { $title = azeen_author_bio(); } elseif (is_archive()) { $title = get_the_archive_title(); } elseif (is_tax()) { $title = single_term_title('', false); } elseif (is_search()) { $title = sprintf(esc_html__('Search Results for: %s', 'azeen'), esc_html(get_search_query())); } return $title; } endif; /** * Post page main title “Category:”, “Tag:”, “Author:”, “Archives:” and “Other taxonomy name:” */ if (! function_exists('azeen_mainpost_page_title')) : function azeen_mainpost_page_title() { echo '
'; echo '
'; echo '
'; echo '
'; echo '

'; echo azeen_getpost_page_title(); echo '

'; echo '
'; echo '
'; echo '
'; echo ''; echo '
'; echo '
'; echo '
'; } endif; if (! function_exists('azeen_mainpost_blog_title')) : function azeen_mainpost_blog_title() { echo '
'; echo '
'; echo '
'; echo '

'; echo esc_html__('Blog', 'azeen'); echo '

'; echo '
'; echo '
'; echo '
'; } endif; /** * Adds custom classes to the array of body classes. * * @param array $classes Classes for the body element. * @return array */ function azeen_body_classes( $classes ) { $select_header_style = get_theme_mod('select_header_style','header1'); if ( 'header3' == $select_header_style) : /* Adds a class whether layout is boxed or wide */ $classes[] = 'tranparenth3'; else: $classes[] = 'no-tranparent'; endif; return $classes; } add_filter( 'body_class', 'azeen_body_classes' );