post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) { return; } } // Don't print empty markup in archives if there's only one page. if ( $wp_query->max_num_pages < 2 && ( is_home() || is_archive() || is_search() ) ) { return; } $nav_class = ( is_single() ) ? 'post-navigation' : 'paging-navigation'; $category_specific = apply_filters( 'generate_category_post_navigation', false ); ?> %3$s'; } return $template; } } if ( ! function_exists( 'generate_posted_on' ) ) { /** * Prints HTML with meta information for the current post-date/time and author. * * @since 0.1 */ function generate_posted_on() { $date = apply_filters( 'generate_post_date', true ); $author = apply_filters( 'generate_post_author', true ); $time_string = ''; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = '' . $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() ) ); // If our date is enabled, show it. if ( $date ) { echo apply_filters( 'generate_post_date_output', sprintf( '%1$s', // WPCS: XSS ok, sanitization ok. sprintf( '%3$s', esc_url( get_permalink() ), esc_attr( get_the_time() ), $time_string ) ), $time_string ); } // If our author is enabled, show it. if ( $author ) { echo apply_filters( 'generate_post_author_output', sprintf( ' ', // WPCS: XSS ok, sanitization ok. sprintf( ' ', __( 'by', 'generatepress' ), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), /* translators: 1: Author name */ esc_attr( sprintf( __( 'View all posts by %s', 'generatepress' ), get_the_author() ) ), esc_html( get_the_author() ) ) ) ); } } } if ( ! function_exists( 'generate_entry_meta' ) ) { /** * Prints HTML with meta information for the categories, tags. * * @since 1.2.5 */ function generate_entry_meta() { $categories = apply_filters( 'generate_show_categories', true ); $tags = apply_filters( 'generate_show_tags', true ); $comments = apply_filters( 'generate_show_comments', true ); $categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'generatepress' ) ); if ( $categories_list && $categories ) { echo apply_filters( 'generate_category_list_output', sprintf( '%1$s %2$s', // WPCS: XSS ok, sanitization ok. esc_html_x( 'Categories', 'Used before category names.', 'generatepress' ), $categories_list ) ); } $tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'generatepress' ) ); if ( $tags_list && $tags ) { echo apply_filters( 'generate_tag_list_output', sprintf( ' ', // WPCS: XSS ok, sanitization ok. esc_html_x( 'Tags', 'Used before tag names.', 'generatepress' ), $tags_list ) ); } if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) && $comments ) { echo ''; comments_popup_link( __( 'Leave a comment', 'generatepress' ), __( '1 Comment', 'generatepress' ), __( '% Comments', 'generatepress' ) ); echo ''; } } } if ( ! function_exists( 'generate_excerpt_more' ) ) { add_filter( 'excerpt_more', 'generate_excerpt_more' ); /** * Prints the read more HTML to post excerpts. * * @since 0.1 * * @param string $more The string shown within the more link. * @return string The HTML for the more link. */ function generate_excerpt_more( $more ) { return apply_filters( 'generate_excerpt_more_output', sprintf( ' ... %3$s%4$s', the_title_attribute( 'echo=0' ), esc_url( get_permalink( get_the_ID() ) ), __( 'Read more', 'generatepress' ), '' . get_the_title() . '' ) ); } } if ( ! function_exists( 'generate_content_more' ) ) { add_filter( 'the_content_more_link', 'generate_content_more' ); /** * Prints the read more HTML to post content using the more tag. * * @since 0.1 * * @param string $more The string shown within the more link. * @return string The HTML for the more link */ function generate_content_more( $more ) { return apply_filters( 'generate_content_more_link_output', sprintf( '
', the_title_attribute( 'echo=0' ), esc_url( get_permalink( get_the_ID() ) . apply_filters( 'generate_more_jump','#more-' . get_the_ID() ) ), __( 'Read more', 'generatepress' ), '' . get_the_title() . '' ) ); } } if ( ! function_exists( 'generate_post_meta' ) ) { add_action( 'generate_after_entry_title', 'generate_post_meta' ); /** * Build the post meta. * * @since 1.3.29 */ function generate_post_meta() { if ( 'post' == get_post_type() ) : ?>