max_num_pages < 2 ) { return; } ?> ← Older posts', 'bemainty' ) ); ?> →', 'bemainty' ) ); ?> post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) { return; } ?> %link', _x( '← %title', 'Previous post link', 'bemainty' ) ); next_post_link( '%link', _x( '%title →', 'Next post link', 'bemainty' ) ); ?> %2$s'; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = '%2$s%4$s'; } $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() ) ); $categories_list = get_the_category_list( __( ' ', 'bemainty' ) ); if ( $categories_list && bemainty_categorized_blog() ) { printf( '' . __( 'In %1$s', 'bemainty' ) . '', $categories_list ); } $posted_on = sprintf( _x( '- %s', 'post date', 'bemainty' ), '' . $time_string . '' ); $byline = sprintf( _x( 'by %s', 'post author', 'bemainty' ), '' . esc_html( get_the_author() ) . '' ); echo ' ' . $byline . '' . $posted_on . ''; if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo ''; comments_popup_link( __( 'Leave a comment', 'bemainty' ), __( '1 Comment', 'bemainty' ), __( '% Comments', 'bemainty' ) ); echo ''; } } endif; if ( ! function_exists( 'bemainty_entry_footer' ) ) : function bemainty_entry_footer() { if ( 'post' == get_post_type() ) { /* translators: used between list items, there is a space after the comma */ /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', __( ' ', 'bemainty' ) ); if ( $tags_list ) { printf( '' . __( 'Tagged %1$s', 'bemainty' ) . '', $tags_list ); } } edit_post_link( __( 'Edit', 'bemainty' ), '', '' ); } endif; function bemainty_categorized_blog() { if ( false === ( $all_the_cool_cats = get_transient( 'bemainty_categories' ) ) ) { $all_the_cool_cats = get_categories( array( 'fields' => 'ids', 'hide_empty' => 1, 'number' => 2, ) ); $all_the_cool_cats = count( $all_the_cool_cats ); set_transient( 'bemainty_categories', $all_the_cool_cats ); } if ( $all_the_cool_cats > 1 ) { return true; } else { return false; } } function bemainty_category_transient_flusher() { delete_transient( 'bemainty_categories' ); } add_action( 'edit_category', 'bemainty_category_transient_flusher' ); add_action( 'save_post', 'bemainty_category_transient_flusher' ); function bemainty_social_menu() { if ( has_nav_menu( 'social' ) ) { wp_nav_menu( array( 'theme_location' => 'social', 'container' => 'div', 'container_id' => 'menu-social', 'container_class' => 'menu-social', 'menu_id' => 'menu-social-items', 'menu_class' => 'menu-items', 'depth' => 1, 'link_before' => '', 'link_after' => '', 'fallback_cb' => '', ) ); } }