function hsinsider_get_coauthors() { if (function_exists('coauthors')) { $coauthors = coauthors_posts_links(null, null, null, null, false); } else { $coauthors = the_author(); } return $coauthors; }
function cb_get_byline($post) { $cb_meta_onoff = ot_get_option('cb_meta_onoff', 'on'); $cb_byline_author = ot_get_option('cb_byline_author', 'on'); $cb_byline_date = ot_get_option('cb_byline_date', 'on'); $cb_byline_category = ot_get_option('cb_byline_category', 'on'); $cb_prefix = __('Written by', 'cubell'); $cb_byline_author_prefix = ot_get_option('cb_byline_author_prefix', 'Written by'); if ($cb_byline_author_prefix != 'Written by') { $cb_prefix = $cb_byline_author_prefix; } $cb_byline_sep = '<span class="cb-separator">' . ot_get_option('cb_byline_separator', '<i class="fa fa-times"></i>') . '</span>'; $cb_byline = $cb_cat_output = $cb_date = $cb_author = NULL; $cb_post_id = $post->ID; if ($cb_byline_author != 'off') { $cb_author = '<span class="cb-author">' . $cb_prefix; if (function_exists('coauthors_posts_links')) { $cb_author .= ' ' . coauthors_posts_links(null, null, null, null, false); } else { $cb_author .= ' <a href="' . esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '">' . get_the_author() . '</a>'; } $cb_author .= '</span>'; if ($cb_byline_category != 'off' || $cb_byline_date != 'off') { $cb_author .= $cb_byline_sep; } } if ($cb_byline_date != 'off') { $cb_date = '<span class="cb-date"><time class="updated" datetime="' . get_the_time('Y-m-d', $cb_post_id) . '">' . date_i18n(get_option('date_format'), strtotime(get_the_time("Y-m-d", $cb_post_id))) . '</time></span>'; if ($cb_byline_category != 'off') { $cb_date .= $cb_byline_sep; } } if ($cb_byline_category != 'off') { $cb_cats = get_the_category($cb_post_id); if (isset($cb_cats)) { $cb_cat_output = ' <span class="cb-category">'; $i = 1; foreach ($cb_cats as $cb_cat) { if ($i != 1) { $cb_cat_output .= ', '; } $cb_cat_output .= ' <a href="' . esc_url(get_category_link($cb_cat->term_id)) . '" title="' . esc_attr(sprintf(__("View all posts in %s", "cubell"), $cb_cat->name)) . '">' . $cb_cat->cat_name . '</a>'; $i++; } $cb_cat_output .= '</span>'; } } if ($cb_meta_onoff == 'on') { $cb_byline = '<div class="cb-byline">' . $cb_author . $cb_date . $cb_cat_output . '</div>'; } return $cb_byline; }
/** * Set replacement values for specific tokens with Post Author Box */ function pabx_add_replace_values($tokens) { global $coauthors_plus; if (!function_exists('coauthors')) { return $tokens; } $coauthor = array_shift(get_coauthors()); // Co-Authors Plus specific tokens $tokens['%coauthors%'] = coauthors(null, null, null, null, false); $tokens['%coauthors_posts_links%'] = coauthors_posts_links(null, null, null, null, false); $tokens['%coauthors_firstnames%'] = coauthors_firstnames(null, null, null, null, false); // Modify these tokens too, because they might be guest authors $tokens['%display_name%'] = $coauthor->display_name; $tokens['%first_name%'] = $coauthor->first_name; $tokens['%last_name%'] = $coauthor->last_name; $tokens['%description%'] = $coauthor->description; $tokens['%email%'] = $coauthor->email; $tokens['%jabber%'] = $coauthor->jabber; $tokens['%aim%'] = $coauthor->aim; $tokens['%avatar%'] = get_avatar($coauthor->user_email); return $tokens; }
function filter_the_author_posts_link() { return coauthors_posts_links(null, null, null, null, false); }
function the_byline_front($displayBy = true) { global $post, $authordata, $wpdb; $authorid = $post->post_author; $articleFormats = wp_get_post_terms($post->ID, 'article-format'); if (isset($articleFormats[0])) { $articleFormat = $articleFormats[0]->slug; } if (empty($articleFormat) || $articleFormat === 'normal') { $articleFormat = get_field('db_article_format'); } if ($authorid == 0 || !isset($authorid) || $articleFormat == "brief" || get_field('db_article_format') == 'default' && in_array('hide_byline', get_field('db_display_options'))) { return false; } // Get coauthors ob_start(); coauthors_posts_links(); $coauthors = ob_get_contents(); ob_end_clean(); // Code modified from WordPress core, wp-includes/author-template.php $by = "By "; if (!$displayBy) { $by = ""; } $link = '<h5 style="text-transform:uppercase">' . $by . $coauthors . '</h5>'; echo apply_filters('the_byline', $link); }
/** * Check if the Co-Authors PLus plugin is enabled for multi-author support **/ function coauthors_author_info() { if (function_exists('coauthors_posts_links')) { coauthors_posts_links(); } else { the_author_posts_link(); } }
/** * Prints HTML with meta information for the current post-date/time and author. */ function zerif_posted_on() { $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time>'; if (get_the_time('U') !== get_the_modified_time('U')) { $time_string .= '<time class="updated" datetime="%3$s">%4$s</time>'; } $time_string = sprintf($time_string, esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_attr(get_the_modified_date('c')), esc_html(get_the_modified_date())); printf(__('<span class="posted-on">Posted on %1$s</span><br><span class="byline"> by %2$s</span>', 'zerif-lite'), sprintf('<a href="%1$s" rel="bookmark">%2$s</a>', esc_url(get_permalink()), $time_string), coauthors_posts_links(null, null, null, null, false)); }
/** * Post Authors Post Link Shortcode * * @author Bill Erickson * @link http://www.billerickson.net/wordpress-post-multiple-authors/ * * @param array $atts * @return string $authors */ function be_post_authors_post_link_shortcode($atts) { $atts = shortcode_atts(array('between' => null, 'between_last' => null, 'before' => null, 'after' => null), $atts); $authors = function_exists('coauthors_posts_links') ? coauthors_posts_links($atts['between'], $atts['between_last'], $atts['before'], $atts['after'], false) : $atts['before'] . get_author_posts_url() . $atts['after']; return $authors; }
<?php } else { ?> <header class="article-header"> <?php } ?> <h1 class="entry-title single-title" itemprop="headline"><?php the_title(); ?> </h1> <p class="byline vcard"> <?php if (function_exists('coauthors_posts_links')) { printf(__('<span class="author">%3$s</span> <time class="updated" datetime="%1$s">%2$s</time>', 'bonestheme'), get_the_time('Y-m-j'), get_the_time(get_option('date_format')), coauthors_posts_links(null, null, 'By ', null, false)); } else { printf(__('<span class="author">%3$s</span> <time class="updated" datetime="%1$s">%2$s</time>', 'bonestheme'), get_the_time('Y-m-j'), get_the_time(get_option('date_format')), the_author_posts_link()); } ?> </p> </header> <?php // end article header ?> <section class="entry-content cf" itemprop="articleBody"> <?php // the content (pretty self explanatory huh) the_content();
function cb_get_byline($cb_post_id, $cb_cat = NULL, $cb_is_post = NULL, $cb_views_on = NULL, $cb_override = NULL) { $cb_meta_onoff = ot_get_option('cb_meta_onoff', 'on'); $cb_byline_author = ot_get_option('cb_byline_author', 'on'); $cb_byline_date = ot_get_option('cb_byline_date', 'on'); $cb_post_meta_views = ot_get_option('cb_byline_postviews', 'on'); $cb_byline_sep = '<span class="cb-separator">' . ot_get_option('cb_byline_separator', '<i class="fa fa-times"></i>') . '</span>'; $cb_byline = $cb_date = $cb_author = $cb_cat_output = $cb_author_avatar = $cb_views_output = NULL; $cb_post_meta_category = ot_get_option('cb_byline_category', 'on'); if ($cb_byline_author != 'off') { if ($cb_is_post == true) { $cb_author_avatar = apply_filters('cb_byline_avatar', get_avatar(get_post_field('post_author', $cb_post_id), 20), $cb_post_id); } if (ot_get_option('cb_byline_author_av', 'on') == 'off') { $cb_author_avatar = NULL; } if (function_exists('coauthors_posts_links')) { $cb_author = apply_filters('cb_byline_coauthors', '<span class="cb-author"> ' . coauthors_posts_links(null, null, $cb_author_avatar, null, false) . '</span>', $cb_author_avatar); } else { $cb_author = apply_filters('cb_byline_author', '<span class="cb-author"> <a href="' . esc_url(get_author_posts_url(get_post_field('post_author', $cb_post_id))) . '">' . $cb_author_avatar . get_the_author_meta('display_name', get_post_field('post_author', $cb_post_id)) . '</a></span>', $cb_post_id, $cb_author_avatar); } if ($cb_byline_date != 'off') { $cb_author .= $cb_byline_sep; } } if ($cb_byline_date != 'off') { //$cb_date = apply_filters( 'cb_byline_date', '<span class="cb-date"><time class="updated" datetime="' . get_the_time('Y-m-d', $cb_post_id) . '">' .human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago' . '</time></span>', $cb_post_id ); $cb_date = apply_filters('cb_byline_date', '<span class="cb-date"><time class="updated" datetime="' . get_the_time('Y-m-d', $cb_post_id) . '">' . date_i18n(get_option('date_format'), strtotime(get_the_time("Y-m-d", $cb_post_id))) . '</time></span>', $cb_post_id); } if ($cb_cat != NULL) { if ($cb_post_meta_category != 'off') { $cb_cats = get_the_category($cb_post_id); if (!empty($cb_cats)) { foreach ($cb_cats as $cb_cat => $cb_current_cat) { if ($cb_byline_date != 'off' || $cb_byline_author != 'off') { $cb_cat_output .= $cb_byline_sep; } $cb_cat_output .= apply_filters('cb_byline_category', '<span class="cb-category cb-element"><a href="' . esc_url(get_category_link($cb_current_cat->term_id)) . '" title="' . esc_attr(sprintf(__("View all posts in %s", "cubell"), $cb_current_cat->name)) . '">' . $cb_current_cat->cat_name . '</a></span>', $cb_current_cat); } } } } if ($cb_views_on != NULL) { if ($cb_post_meta_views != 'off') { $cb_view_count = cb_get_post_viewcount($cb_post_id); if ($cb_view_count != NULL) { if ($cb_byline_date != 'off' || $cb_byline_author != 'off' || $cb_post_meta_category != 'off') { $cb_views_output .= $cb_byline_sep; } $cb_views_output .= apply_filters('cb_byline_views', '<span class="cb-views cb-element">' . $cb_view_count . '</span>', $cb_view_count); } } } if ($cb_meta_onoff == 'on' || $cb_override == 'on') { $cb_byline = '<div class="cb-byline">' . apply_filters('cb_byline_start', '') . $cb_author . $cb_date . $cb_cat_output . $cb_views_output . apply_filters('cb_byline_end', '') . '</div>'; } return $cb_byline; }
function bild_func( $atts ) { extract( shortcode_atts( array( 'image_url' => 'Bild wird nicht richtig angezeigt', 'background_position' => 'top', 'type' => 'night', 'text_shadow' => '#e74c3c', 'main_info' => 'Основная информация о проекте', 'header_subtext' => 'Помните, в конце января 2014 года было адовое муниципальное собрание, где мы согласовывали реконструкцию сквера? Наверняка нет. Я писал об этом тут. Там прямо на собрании разгорелись дебаты. Я хотел устроить в сквере побольше точек притяжения для разных возрастов.', ), $atts ) ); $image = wp_get_attachment_image_src($image_url, 'full'); if($type == 'night' || $type == 'Ночь') $textColor = 'white'; else $textColor = 'black'; set_query_var( 'textColor', $textColor ); global $post; $post_type = get_post_type_object($post->post_type); ?> </div> </article> </div> </div> <div class="container-fluid fancy" style="margin-top:-65px; margin-bottom:65px;"> <div class="fancy-title" style="min-height:500px; background: url('<?= $image[0] ?>'); background-position: <?= $background_position ?> center; background-size:cover;"> <div class="fancy-title--mask"></div> <div class="container-size fancy-fix"> <header> <div class="header row"> <?php get_template_part( 'template-parts/header', 'top' ); ?> </div> <div class="header row"> <?php get_template_part( 'template-parts/header', 'logo-fancy' ); ?> </div> </header> <div class="article row"> <div class="article__breadcrumbs row"> <ul class="col-md-12"> <li><a href="/">Главная</a></li> <li><a href="<? the_permalink() ?>"><? the_title() ?></a></li> </ul> </div> <? if($post_type->labels->singular_name != 'Запись'): ?> <div class="article__tags row"> <p class="col-md-12 col-sm-12 col-xs-12" style="color: <?= $textColor ?>;"><?= $post_type->labels->singular_name ?></p> </div> <? endif; ?> <div class="article__title-wrapper row"> <div class="article__title col-md-8 col-sm-12 col-xs-12"> <h1 style="color: <?= $textColor ?>; text-shadow: 5px 5px 0px #e74c3c;"><? the_title() ?></h1> <h3 style="color: <?= $textColor ?>;"><? the_secondary_title() ?></h3> <h2><?= $main_info ?></h2> <p><?= $header_subtext ?></p> </div> <div class="article__meta col-md-pull-right col-sm-pull-left col-md-offset-2 col-md-2" style="text-shadow: 1px 1px 0px black;"> <p class="article__meta-author-title">Над проектом работали:</p> <p class="article__meta-author" style="color: <?= $textColor ?>; text-shadow: 1px 1px 0px #e74c3c;"> <? if ( function_exists( 'coauthors_posts_links' ) ) { coauthors_posts_links(', ',' и '); } else { the_author_posts_link(); } ?> </p> <p><span class="article__meta-time"><?php echo get_the_time(); ?>,</span> <span class="article__meta-date"><?php echo get_the_date(); ?></span></p> </div> </div> </div> </div> </div> </div> <div class="container-fluid container-size"> <article> <div class="article__content article__content-text"> <div> <? return ""; }
</div> <?php } ?> <div class="sidebar-section"> <h2 class="smalltitle"> <?php //Autor(en) echo '<img src="' . get_bloginfo('template_directory') . '/images/author16px.png" alt="autor"/> '; $authors = new CoAuthorsIterator(); print $authors->count() == 1 ? 'Der Autor' : 'Die Autoren'; ?> </h2> <ul class="smalltext authors"> <?php coauthors_posts_links('</li><li>', '</li><li>', '<li>', '</li>'); ?> </ul> </div> <div class="sidebar-section"> <h2 class="smalltitle"><?php echo '<img src="' . get_bloginfo('template_directory') . '/images/calendar16px.png" alt="kalender"/> '; ?> Datum</h2> <?php //Datum echo '<p class="smalltext">Erschienen am ' . get_the_time('j. F Y H:i') . '<br/>'; //Monatsarchiv echo '<a href="' . get_month_link(get_the_time('Y'), get_the_time('n')) . '">» zum Monats-Archiv</a></p>'; ?> </div>
/** * Prints HTML with meta information for the current post-date/time and author. * * @since Twenty Ten 1.0 */ function twentyten_posted_on() { /* if(get_the_tags()!='') { printf( __( '<span class="%1$s">,</span>%2$s | Author: %3$s', 'twentyten' ), 'meta-prep meta-prep-author', get_the_category_list( ', ' ), sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="">%3$s</a></span>', get_author_posts_url( get_the_author_meta( 'ID' ) ), esc_attr( sprintf( __( 'View all posts by %s', 'twentyten' ), get_the_tag_list() ) ), get_the_tag_list() ) ); } else {*/ the_terms($post->ID, 'edition', '<i>Section: </i>', ', ', ' '); printf(__('<span class="%1$s">, </span>%2$s | Author: %3$s', 'twentyten'), 'meta-prep meta-prep-author', get_the_category_list(', '), sprintf('<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>', get_author_posts_url(get_the_author_meta('ID')), esc_attr(sprintf(__('View all posts by %s', 'twentyten'), get_the_author())), coauthors_posts_links())); /*}*/ }
?> "><?php the_title(); ?> </a></h2> <h4><?php the_field("subtitle"); ?> </h3> <div class="byline"> <div class="featured-text-byline"> <?php if (function_exists('coauthors_posts_links')) { ?> By <?php coauthors_posts_links('display_name'); } else { ?> By <?php get_the_author(); } ?> </div> <a href=""><i class="fa fa-facebook-official"></i></a> <a href="https://twitter.com/share?text=<?php the_title(); ?> " target="_blank" onclick="javascript:window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"> <i class="fa fa-twitter-square"></i> </a> </div>
/** gets co-authors link if co-aurhors plugin is installed. * otherwise, gets the link mannually. * * @used by: Home-guest-article; apn_guest_authors_meta(); */ function apn_guest_authors_link() { if (function_exists('coauthors_posts_links')) { $poster = get_the_author(); $author = coauthors(null, null, null, null, false); if ($poster != $author) { $before = "<span class=\"glyphicon glyphicon-user\"> </span> "; return coauthors_posts_links(null, null, $before, null, false); } else { return false; } } else { return "WP Co-Authors Plus Plugin missing. See https://wordpress.org/plugins/co-authors-plus/"; } }
/** * Shows meta information of post. */ function colormag_entry_meta() { if ('post' == get_post_type()) { echo '<div class="below-entry-meta">'; ?> <?php $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time>'; if (get_the_time('U') !== get_the_modified_time('U')) { $time_string .= '<time class="updated" datetime="%3$s">%4$s</time>'; } $time_string = sprintf($time_string, esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_attr(get_the_modified_date('c')), esc_html(get_the_modified_date())); printf(__('<span class="posted-on"><a href="%1$s" title="%2$s" rel="bookmark"><i class="fa fa-calendar-o"></i> %3$s</a></span>', 'colormag'), esc_url(get_permalink()), esc_attr(get_the_time()), $time_string); ?> <?php if (function_exists('coauthors_posts_links')) { ?> <span class="byline"> <span class="author vcard"> <i class="fa fa-user"></i> <a class="url fn n"> <?php echo coauthors_posts_links(null, null, null, null, false); ?> </a> </span> </span> <?php } else { ?> <span class="byline"> <span class="author vcard"> <i class="fa fa-user"></i> <a class="url fn n" href="<?php echo esc_url(get_author_posts_url(get_the_author_meta('ID'))); ?> " title="<?php echo get_the_author(); ?> "> <?php echo esc_html(get_the_author()); ?> </a> </span> </span> <?php } ?> <?php if (!post_password_required() && comments_open()) { ?> <span class="comments"><?php comments_popup_link(__('<i class="fa fa-comment"></i> 0 Comment', 'colormag'), __('<i class="fa fa-comment"></i> 1 Comment', 'colormag'), __('<i class="fa fa-comments"></i> % Comments', 'colormag')); ?> </span> <?php } $tags_list = get_the_tag_list('<span class="tag-links"><i class="fa fa-tags"></i>', __(', ', 'colormag'), '</span>'); if ($tags_list) { echo $tags_list; } edit_post_link(__('Edit', 'colormag'), '<span class="edit-link"><i class="fa fa-edit"></i>', '</span>'); echo '</div>'; } }
function cb_byline($cb_cat = true, $cb_post_id = NULL, $cb_short_comment_line = false, $cb_posts_on = false, $cb_post_views_off = false) { if ($cb_post_id == NULL) { global $post; $cb_post_id = $post->ID; } $cb_meta_onoff = ot_get_option('cb_meta_onoff', 'on'); $cb_byline_author = ot_get_option('cb_byline_author', 'on'); $cb_byline_date = ot_get_option('cb_byline_date', 'on'); $cb_byline_category = ot_get_option('cb_byline_category', 'on'); $cb_byline_comments = ot_get_option('cb_byline_comments', 'on'); $cb_byline_postviews = ot_get_option('cb_byline_postviews', 'off'); $cb_disqus_code = ot_get_option('cb_disqus_shortname', NULL); $cb_byline = $cb_cat_output = $cb_comments = $cb_post_views = NULL; $cb_cats = get_the_category($cb_post_id); if (isset($cb_cats) && $cb_cat == true) { $cb_cat_output = ' <div class="cb-category cb-byline-element"><i class="fa fa-folder"></i> '; $i = 1; foreach ($cb_cats as $category) { if ($i != 1) { $cb_cat_output .= ', '; } $cb_cat_output .= ' <a href="' . get_category_link($category->term_id) . '" title="' . esc_attr(sprintf(__("View all posts in %s", "cubell"), $category->name)) . '">' . $category->cat_name . '</a>'; $i++; } $cb_cat_output .= '</div>'; } if ($cb_disqus_code == NULL) { if (get_comments_number($cb_post_id) > 0) { if ($cb_short_comment_line == true) { $cb_comments = ' <div class="cb-comments cb-byline-element"><span><i class="fa fa-comment"></i><a href="' . get_comments_link($cb_post_id) . '">' . number_format_i18n(get_comments_number($cb_post_id)) . '</a></span></div>'; } else { $cb_comment_line = __('Comment', 'cubell'); $cb_comments_line = __('Comments', 'cubell'); $cb_comments = ' <div class="cb-comments cb-byline-element"><span><i class="fa fa-comment"></i><a href="' . get_comments_link($cb_post_id) . '">' . number_format_i18n(get_comments_number($cb_post_id)) . ' ' . get_comments_number_text($cb_comment_line, $cb_comment_line, $cb_comments_line) . '</a></span></div>'; } } } else { $cb_comments = ' <div class="cb-comments cb-byline-element"><span><i class="fa fa-comment"></i><a href="' . get_permalink($cb_post_id) . '#disqus_thread"></a></span></div>'; } if ($cb_post_views_off == false) { $cb_post_view_count = cb_get_post_viewcount($cb_post_id); if ($cb_post_view_count > 0) { $cb_post_views = '<div class="cb-post-views cb-byline-element"><span><i class="fa fa-eye"></i> ' . $cb_post_view_count . '</span></div>'; } } $cb_author = '<div class="cb-author cb-byline-element">'; if (function_exists('coauthors_posts_links')) { $cb_author .= '<i class="fa fa-user"></i> ' . coauthors_posts_links(null, null, null, null, false); } else { $cb_author .= '<i class="fa fa-user"></i> <a href="' . get_author_posts_url(get_the_author_meta('ID')) . '">' . get_the_author() . '</a>'; } $cb_author .= '</div>'; $cb_date = ' <div class="cb-date cb-byline-element"><i class="fa fa-clock-o"></i> <time class="updated" datetime="' . get_the_time('Y-m-d', $cb_post_id) . '">' . date_i18n(get_option('date_format'), strtotime(get_the_time("Y-m-d", $cb_post_id))) . '</time></div>'; if ($cb_byline_date == 'off') { $cb_date = NULL; } if ($cb_byline_author == 'off') { $cb_author = NULL; } if ($cb_byline_category == 'off') { $cb_cat_output = NULL; } if ($cb_byline_comments == 'off') { $cb_comments = NULL; } if ($cb_byline_postviews == 'off') { $cb_post_views = NULL; } if ($cb_meta_onoff == 'on' || $cb_posts_on == true) { $cb_byline = '<div class="cb-byline">' . $cb_author . $cb_date . $cb_cat_output . $cb_comments . $cb_post_views . '</div>'; } return $cb_byline; }
<span class="bolded-text">Author(s):</span><br> <?php if ($authors) { ?> <?php coauthors_posts_links(', ', ', '); ?> , <?php echo $authors; ?> <?php } else { ?> <?php coauthors_posts_links(', '); ?> <?php } ?> </p> <p><span class="bolded-text">Date:</span><br><?php the_time('M j, Y'); ?> </p> <p class="sidebar-cats"><span class="bolded-text">Category:</span><?php echo get_the_category_list(); ?> </p> <?php
<div class="post-meta header-font"> <?php if (function_exists('coauthors_posts_links')) { coauthors_posts_links(null, '<span class="author-separator">and</span>'); } else { ?> <?php echo get_avatar(get_the_author_meta('user_email'), 48); ?> <a class="author-name vcard author" href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?> " title="<?php _e('View all posts by', 'envirra'); ?> <?php the_author(); ?> "><span class="fn"><?php the_author(); ?> </span></a> <?php } ?> <?php $post_date = get_the_time(get_option('date_format')); ?> <span class="post-meta-separator">—</span> <a href="<?php the_permalink();
</a> </h2> <p class="entry-meta"> <time class="published" pubdate="pubdate" datetime="<?php the_time('Y-m-d\\TH:i:sP'); ?> " title="<?php the_time('Y-m-d\\TH:i:sP'); ?> "><?php the_time(get_option('date_format')); ?> </time> • by <?php if (function_exists(coauthors_posts_links)) { coauthors_posts_links(); } else { the_author_posts_link(); } ?> • <?php if (in_category($featureddemo_id)) { fc_category_minusdemo(', '); } else { the_category(', '); } ?> • <?php $comment_count = get_comment_count($post->ID); if (comments_open() || $comment_count['approved'] > 0) { ?>
/** * Output of meta information for current post: categories, tags, permalink, author, and date. */ function meta_custom_render() { global $ss_framework, $ss_settings, $post; // get config and data $metas = $ss_settings['shoestrap_entry_meta_config']; $date_format = $ss_settings['date_meta_format']; $categories_list = get_the_category_list(__(', ', 'shoestrap')); $tag_list = get_the_tag_list('', __(', ', 'shoestrap')); $i = 0; if (is_array($metas)) { foreach ($metas as $meta => $value) { if ($meta == 'sticky') { if (!empty($value) && is_sticky()) { $i++; } } elseif ($meta == 'date') { if (!empty($value)) { $i++; } } elseif ($meta == 'category') { if (!empty($value) && has_category()) { $i++; } } elseif ($meta == 'tags') { if (!empty($value) && has_tag()) { $i++; } } elseif ($meta == 'author') { if (!empty($value)) { $i++; } } elseif ($meta == 'comment-count' && !post_password_required() && (comments_open() || get_comments_number())) { if (!empty($value)) { $i++; } } elseif ($meta == 'post-format') { if (!empty($value)) { $i++; } } } } $col = $i >= 2 ? round(12 / $i, 0) : 12; $content = ''; if (is_array($metas)) { foreach ($metas as $meta => $value) { // output sticky element if ($meta == 'sticky' && !empty($value) && is_sticky()) { $content .= $ss_framework->open_col('span', array('medium' => $col), null, 'featured-post') . '<i class="el-icon-flag icon"></i> ' . __('Sticky', 'shoestrap') . $ss_framework->close_col('span'); } // output post format element if ($meta == 'post-format' && !empty($value)) { if (get_post_format($post->ID) === 'gallery') { $content .= $ss_framework->open_col('span', array('medium' => $col), null, 'post-format') . '<i class="el-icon-picture"></i> <a href="' . esc_url(get_post_format_link('gallery')) . '">' . __('Gallery', 'shoestrap') . '</a>' . $ss_framework->close_col('span'); } if (get_post_format($post->ID) === 'aside') { $content .= $ss_framework->open_col('span', array('medium' => $col), null, 'post-format') . '<i class="el-icon-chevron-right"></i> <a href="' . esc_url(get_post_format_link('aside')) . '">' . __('Aside', 'shoestrap') . '</a>' . $ss_framework->close_col('span'); } if (get_post_format($post->ID) === 'link') { $content .= $ss_framework->open_col('span', array('medium' => $col), null, 'post-format') . '<i class="el-icon-link"></i> <a href="' . esc_url(get_post_format_link('link')) . '">' . __('Link', 'shoestrap') . '</a>' . $ss_framework->close_col('span'); } if (get_post_format($post->ID) === 'image') { $content .= $ss_framework->open_col('span', array('medium' => $col), null, 'post-format') . '<i class="el-icon-picture"></i> <a href="' . esc_url(get_post_format_link('image')) . '">' . __('Image', 'shoestrap') . '</a>' . $ss_framework->close_col('span'); } if (get_post_format($post->ID) === 'quote') { $content .= $ss_framework->open_col('span', array('medium' => $col), null, 'post-format') . '<i class="el-icon-quotes-alt"></i> <a href="' . esc_url(get_post_format_link('quote')) . '">' . __('Quote', 'shoestrap') . '</a>' . $ss_framework->close_col('span'); } if (get_post_format($post->ID) === 'status') { $content .= $ss_framework->open_col('span', array('medium' => $col), null, 'post-format') . '<i class="el-icon-comment"></i> <a href="' . esc_url(get_post_format_link('status')) . '">' . __('Status', 'shoestrap') . '</a>' . $ss_framework->close_col('span'); } if (get_post_format($post->ID) === 'video') { $content .= $ss_framework->open_col('span', array('medium' => $col), null, 'post-format') . '<i class="el-icon-video"></i> <a href="' . esc_url(get_post_format_link('video')) . '">' . __('Video', 'shoestrap') . '</a>' . $ss_framework->close_col('span'); } if (get_post_format($post->ID) === 'audio') { $content .= $ss_framework->open_col('span', array('medium' => $col), null, 'post-format') . '<i class="el-icon-volume-up"></i> <a href="' . esc_url(get_post_format_link('audio')) . '">' . __('Audio', 'shoestrap') . '</a>' . $ss_framework->close_col('span'); } if (get_post_format($post->ID) === 'chat') { $content .= $ss_framework->open_col('span', array('medium' => $col), null, 'post-format') . '<i class="el-icon-comment-alt"></i> <a href="' . esc_url(get_post_format_link('chat')) . '">' . __('Chat', 'shoestrap') . '</a>' . $ss_framework->close_col('span'); } } // output date element if ($meta == 'date' && !empty($value)) { if (!has_post_format('link')) { $format_prefix = has_post_format('chat') || has_post_format('status') ? _x('%1$s on %2$s', '1: post format name. 2: date', 'shoestrap') : '%2$s'; if ($date_format == 0) { $text = esc_html(sprintf($format_prefix, get_post_format_string(get_post_format()), get_the_date())); $icon = "el-icon-calendar icon"; } elseif ($date_format == 1) { $text = sprintf(human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ago'); $icon = "el-icon-time icon"; } $content .= sprintf($ss_framework->open_col('span', array('medium' => $col), null, 'date') . '<i class="' . $icon . '"></i> <a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a>' . $ss_framework->close_col('span'), esc_url(get_permalink()), esc_attr(sprintf(__('Permalink to %s', 'shoestrap'), the_title_attribute('echo=0'))), esc_attr(get_the_date('c')), $text); } } // output category element if ($meta == 'category' && !empty($value)) { if ($categories_list) { $content .= $ss_framework->open_col('span', array('medium' => $col), null, 'categories-links') . '<i class="el-icon-folder-open icon"></i> ' . $categories_list . $ss_framework->close_col('span'); } } // output tag element if ($meta == 'tags' && !empty($value)) { if ($tag_list) { $content .= $ss_framework->open_col('span', array('medium' => $col), null, 'tags-links') . '<i class="el-icon-tags icon"></i> ' . $tag_list . $ss_framework->close_col('span'); } } // start mod -- output co-author links if Co-Authors Plus exists // output author element if ($meta == 'author' && !empty($value)) { if (function_exists('get_coauthors')) { $the_coauthors = get_coauthors($post->ID); } if (function_exists('get_coauthors') && $the_coauthors[0]->type != 'wpuser') { ob_start(); $authors_links_mod = coauthors_posts_links(null, ' and ', '<i class="el-icon-user icon"></i> ', null); ob_end_clean(); $content .= $ss_framework->open_col('span', array('medium' => $col), null, 'author vcard') . $authors_links_mod . $ss_framework->close_col('span'); } /* else { //do nothing $content .= sprintf( $ss_framework->open_col( 'span', array( 'medium' => $col ), null, 'author vcard' ) . '<i class="el-icon-user icon"></i> Posted by <a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a>' . $ss_framework->close_col( 'span' ), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( __( 'View all posts by %s', 'shoestrap' ), get_the_author() ) ), get_the_author() ); } */ } // End mod // output comment count element if ($meta == 'comment-count' && !empty($value)) { if (!post_password_required() && (comments_open() || get_comments_number())) { $content .= $ss_framework->open_col('span', array('medium' => $col), null, 'comments-link') . '<i class="el-icon-comment icon"></i> <a href="' . get_comments_link($post->ID) . '">' . get_comments_number($post->ID) . ' ' . __('Comments', 'shoestrap') . '</a>' . $ss_framework->close_col('span'); } } /* // Output author meta but do not display it if user has selected not to show it. if ( $meta == 'author' && empty( $value ) ) { $content .= sprintf( $ss_framework->open_col( 'span', array( 'medium' => $col ), null, 'author vcard' ) . '<a class="url fn n" href="%1$s" title="%2$s" rel="author" style="display:none;">%3$s</a>' . $ss_framework->close_col( 'span' ), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( __( 'View all posts by %s', 'shoestrap' ), get_the_author() ) ), get_the_author() ); } */ } } if (!empty($content)) { echo $ss_framework->open_row('div', null, 'row-meta') . $content . $ss_framework->close_row('div'); } }