'div-comment',
'depth' => $depth,
'max_depth' => $args['max_depth'],
) ) );
?>
%2$s'; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = ''; } $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() ) ); $posted_on = '' . $time_string . ''; if ( get_theme_mod('header_titlebar', 'off') == 'on' ) { global $post; $username = get_userdata( $post->post_author ); $byline = ''; } else { $byline = ''; } echo '' . $posted_on . ''; $categories_list = get_the_category_list( __( ', ', 'meteorite' ) ); if ( $categories_list && meteorite_categorized_blog() ) { printf( '' . ( '%1$s' ) . '', $categories_list ); } if ( 'projects' == get_post_type() ) { $project_categories = get_the_term_list( '', 'project-category', '', ', ', '' ); if ( $project_categories ) { printf( '' . ( '%1$s' ) . '', $project_categories ); } } if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo ''; comments_popup_link( __( 'Leave a comment', 'meteorite' ), __( '1 Comment', 'meteorite' ), __( '% Comments', 'meteorite' ) ); echo ''; } // 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( '', __( ', ', 'meteorite' ) ); if ( $tags_list && is_single() ) { printf( '', $tags_list ); } } } endif; if ( ! function_exists( 'meteorite_entry_footer' ) ) : /** * Prints Edit Post Link */ function meteorite_entry_footer() { edit_post_link( __( 'Edit', 'meteorite' ), '', '' ); } endif; if ( ! function_exists( 'meteorite_post_navigation' ) ) : /** * Prints HTML with post titles */ function meteorite_post_navigation() { // Don't print empty markup if there's nowhere to navigate. $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) { return; } ?> post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) { return; } $project_page = get_theme_mod('project_page_url'); ?> post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) { return; } $prevPost = get_adjacent_post( false, '', true ); if ( $prevPost ) { $prevTitle = get_the_title($prevPost->ID); $prevLink = get_the_permalink($prevPost->ID); $prevThumbnail = get_the_post_thumbnail($prevPost->ID, 'meteorite-small-thumb'); } $nextPost = get_adjacent_post( false, '', false ); if ( $nextPost ) { $nextTitle = get_the_title($nextPost->ID); $nextLink = get_the_permalink($nextPost->ID); $nextThumbnail = get_the_post_thumbnail($nextPost->ID, 'meteorite-small-thumb'); } ?> post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) { return; } $project_page = get_theme_mod('project_page_url'); $prevProject = get_adjacent_post( false, '', true ); if ( $prevProject ) { $prevTitle = get_the_title($prevProject->ID); $prevLink = get_the_permalink($prevProject->ID); $prevThumbnail = get_the_post_thumbnail($prevProject->ID, 'meteorite-small-thumb'); } $nextProject = get_adjacent_post( false, '', false ); if ( $nextProject ) { $nextTitle = get_the_title($nextProject->ID); $nextLink = get_the_permalink($nextProject->ID); $nextThumbnail = get_the_post_thumbnail($nextProject->ID, 'meteorite-small-thumb'); } ?> '; the_posts_pagination( array( 'mid_size' => 2, 'prev_text' => __( 'Newer', 'meteorite' ), 'next_text' => __( 'Older', 'meteorite' ), ) ); echo ''; endif; } endif; if ( ! function_exists( 'meteorite_post_navigation_arrows' ) ) : /** * Prints HTML arrow buttons to navigate posts */ function meteorite_post_navigation_arrows() { // Don't print empty markup if there's nowhere to navigate. $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) { return; } ?> post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) { return; } ?> ' . esc_html( get_the_author() ) . '' ); if ( is_single() && get_the_author() != '' ) : echo '
'; endif; } endif; /** * Returns true if a blog has more than 1 category. * * @return bool */ function meteorite_categorized_blog() { if ( false === ( $all_the_cool_cats = get_transient( 'meteorite_categories' ) ) ) { // Create an array of all the categories that are attached to posts. $all_the_cool_cats = get_categories( array( 'fields' => 'ids', 'hide_empty' => 1, // We only need to know if there is more than one category. 'number' => 2, ) ); // Count the number of categories that are attached to the posts. $all_the_cool_cats = count( $all_the_cool_cats ); set_transient( 'meteorite_categories', $all_the_cool_cats ); } if ( $all_the_cool_cats > 1 ) { // This blog has more than 1 category so meteorite_categorized_blog should return true. return true; } else { // This blog has only 1 category so meteorite_categorized_blog should return false. return false; } } if ( ! function_exists( 'meteorite_comment' ) ) : /** * Template for comments and pingbacks. * * Used as a callback by wp_list_comments() for displaying the comments. */ function meteorite_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; if ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) : ?>