ID; } // If there are no items to display, return nothing if ( NULL === $display ) { $display = array( 'date', 'author', 'categories', 'tags' ); } // Allow for filtering of the display elements. $display = apply_filters( 'layers_post_meta_display', $display ); foreach ( $display as $meta ) { switch ( $meta ) { case 'date' : $meta_to_display[] = 'name ) ) . '">'.$category->name.''; } $meta_to_display[] = ' '; break; case 'tags' : $tags = ''; if( 'post' == get_post_type( $post_id ) ){ $the_tags = get_the_tags( $post_id ); } elseif( 'layers-project' == get_post_type( $post_id ) ) { $the_tags = get_the_terms( $post_id , 'project-tag' ); } else { $the_tags = FALSE; } // If there are no tags, skip to the next case if( !$the_tags ) continue; foreach ( $the_tags as $tag ){ $tags[] = ' name ) ) . '">'.$tag->name.''; } $meta_to_display[] = ' '; break; break; } // switch meta } // foreach $display if( !empty( $meta_to_display ) ) { echo '<' , $wrapper , ( ( '' != $wrapper_class ) ? ' class="' . $wrapper_class . '"' : NULL ) , '>'; echo '
'; break; case 'author' : $meta_to_display[] = ' '; break; case 'categories' : $categories = ''; // Use different terms for different post types if( 'post' == get_post_type( $post_id ) ){ $the_categories = get_the_category( $post_id ); } elseif( 'portfolio' == get_post_type( $post_id ) ) { $the_categories = get_the_terms( $post_id , 'portfolio-category' ); } else { $the_categories = FALSE; } // If there are no categories, skip to the next case if( !$the_categories ) continue; foreach ( $the_categories as $category ){ $categories[] = ''; echo implode( ' ' , $meta_to_display ); echo '
'; echo '' , $wrapper , '>'; } } } // layers_post_meta /** * Prints HTML with meta information for the current post-date/time and author. */ if ( ! function_exists( 'layers_get_the_author' ) ) { function layers_get_the_author() { return sprintf( __( '%3$s' , 'layerswp' ), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( __( 'View all posts by %s', 'layerswp' ), get_the_author() ) ), esc_attr( get_the_author() ) ); } } // layers_get_the_author /** * Prints Comment HTML * * @param object $comment Comment objext * @param array $args Configuration arguments. * @param int $depth Current depth of comment, for example 2 for a reply * @echo string Comment HTML */ if( !function_exists( 'layers_comment' ) ) { function layers_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment;?>
$depth, 'max_depth' => $args['max_depth']))) ?>