'.esc_html__('Read more','azeen').''; else: if ( is_admin() ) { return $more; } return '...'; endif; } add_filter('excerpt_more', 'azeen_excerpt_more'); /** * Link thumbnails to their posts based on attr * * @param $html * @param int $pid * @param int $post_thumbnail_id * @param int $size * @param array $attr * * @return string */ function azeen_filter_post_thumbnail_html( $html, $pid, $post_thumbnail_id, $size, $attr ) { if ( ! empty( $attr[ 'link_thumbnail' ] ) ) { $html = sprintf( '%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; /** * Use front-page.php when Front page displays is set to a static page. * * @since Magazine Art 1.0 * * @param string $template front-page.php. * * @return string The template to be used: blank if is_home() is true (defaults to index.php), else $template. */ function azeen_front_page_template($template) { return is_home() ? '' : $template; } add_filter('frontpage_template', 'azeen_front_page_template'); /** * 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 slider_setup if (! function_exists('azeen_category_slider')) : function azeen_category_slider() { $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('Tags:', 'azeen'); echo '
'; echo $tags_list; } } } 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 */ __('Posted on %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; if ( ! function_exists( 'azeen_social_share_icons' ) ) : /** * Social sharing icons for single view. * * @since azeen 1.0 */ function azeen_social_share_icons() { global $post; $post_link = get_the_permalink(); $post_title = get_the_title(); $img_url = wp_get_attachment_url( get_post_thumbnail_id($post->ID), 'full' ); $social_links = ''; $allowed_tags = array( 'div' => array( 'class' => array(), ), 'a' => array( 'href' => array(), 'target' => array(), 'title' => array(), 'type' => array(), 'class' => array(), 'data-tooltip' => array(), 'aria-haspopup'=> array(), 'data-disable-hover'=> array(), 'tabindex'=> array(), 'data-positi'=> array(), 'data-alignment'=> array(), ), 'i' => array( 'class' => array(), ), ); $social_links = '
'; echo apply_filters( 'azeen_social_share_icons', wp_kses( $social_links, $allowed_tags ) ); } endif; /** * Enable Foundation responsive embeds for WP video embeds */ if ( ! function_exists( 'azeen_responsive_video_oembed_html' ) ) : function azeen_responsive_video_oembed_html( $html, $url, $attr, $post_id ) { // Whitelist of oEmbed compatible sites that **ONLY** support video. // Cannot determine if embed is a video or not from sites that // support multiple embed types such as Facebook. // Official list can be found here https://codex.wordpress.org/Embeds $video_sites = array( 'youtube', // first for performance 'collegehumor', 'dailymotion', 'funnyordie', 'ted', 'videopress', 'vimeo', ); $is_video = false; // Determine if embed is a video foreach ( $video_sites as $site ) { // Match on `$html` instead of `$url` because of // shortened URLs like `youtu.be` will be missed if ( strpos( $html, $site ) ) { $is_video = true; break; } } // Process video embed if ( true == $is_video ) { // Find the `