Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function enfold_post_meta_infos() {
- $output = "<div class='main_color'>";
- $output .= "<span class='post-meta-infos'>";
- $output .= "<time class='date-container minor-meta updated' >" . get_the_time( get_option( 'date_format' ), get_the_ID() ) . '</time>';
- $output .= "<span class='text-sep text-sep-date'>/</span>";
- // if ( get_comments_number( get_the_ID() ) != '0' || comments_open( get_the_ID() ) )
- // {
- $output .= "<span class='comment-container minor-meta'>";
- ob_start();
- comments_popup_link( '0 ' . __( 'Comments', 'avia_framework' ),
- '1 ' . __( 'Comment', 'avia_framework' ),
- '% ' . __( 'Comments', 'avia_framework' ),
- 'comments-link',
- '' . __( 'Comments Disabled','avia_framework' )
- );
- $output .= ob_get_clean();
- $output .= '</span>';
- $output .= "<span class='text-sep text-sep-comment'>/</span>";
- // }
- $taxonomies = get_object_taxonomies( get_post_type( get_the_ID() ) );
- $cats = '';
- $excluded_taxonomies = array_merge( get_taxonomies( array( 'public' => false ) ), array('post_tag','post_format') );
- $excluded_taxonomies = apply_filters( 'avf_exclude_taxonomies', $excluded_taxonomies, get_post_type( get_the_ID() ), get_the_ID() );
- if( ! empty( $taxonomies ) )
- {
- foreach( $taxonomies as $taxonomy )
- {
- if( ! in_array( $taxonomy, $excluded_taxonomies ) )
- {
- $cats .= get_the_term_list( get_the_ID(), $taxonomy, '', ', ', '' ) . ' ';
- }
- }
- }
- if( ! empty( $cats ) )
- {
- $output .= '<span class="blog-categories minor-meta">' . __( 'in','avia_framework' ) . ' ';
- $output .= $cats;
- $output .= '</span><span class="text-sep text-sep-cat">/</span>';
- }
- $output .= '<span class="blog-author minor-meta">' . __( 'by','avia_framework' ) . ' ';
- $output .= '<span class="entry-author-link" >';
- $output .= '<span class="vcard author"><span class="fn">';
- $output .= get_the_author_posts_link();
- $output .= '</span></span>';
- $output .= '</span>';
- $output .= '</span>';
- $output .= '</span>';
- $output .= '</div>';
- return $output;
- }
- add_shortcode( 'post_meta_infos', 'enfold_post_meta_infos' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement