max_num_pages; } // Don't print empty markup if there's only one page. if ( $max_num_pages < 2 ) { return; } ?> max_num_pages < 2 ) { return; } ?> %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 = sprintf( _x( '%s', 'post date', 'executive' ), '' . $time_string . '' ); $byline = sprintf( _x( 'by %s', 'post author', 'executive' ), '' . esc_html( get_the_author() ) . '' ); echo '' . $posted_on . ''; } endif; if ( ! function_exists( 'executive_entry_footer' ) ) : /** * Prints HTML with meta information for the categories, tags and comments. */ function executive_entry_footer() { // Hide category and tag text for pages. if ( 'post' == get_post_type() ) { /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list( __( ', ', 'executive' ) ); if ( $categories_list && executive_categorized_blog() ) { printf( '' . __( 'Posted in %1$s', 'executive' ) . '', $categories_list ); } /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', __( ', ', 'executive' ) ); if ( $tags_list ) { printf( '' . __( 'Tagged %1$s', 'executive' ) . '', $tags_list ); } } if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo ''; comments_popup_link( __( 'Leave a comment', 'executive' ), __( '1 Comment', 'executive' ), __( '% Comments', 'executive' ) ); echo ''; } edit_post_link( __( 'Edit', 'executive' ), '', '' ); } endif; /** * Display info pages on Homepage. */ function executive_info_pages() { $featured_page_1 = esc_attr( get_theme_mod( 'executive_featured_page_one_front_page', '0' ) ); $featured_page_2 = esc_attr( get_theme_mod( 'executive_featured_page_two_front_page', '0' ) ); $featured_page_3 = esc_attr( get_theme_mod( 'executive_featured_page_three_front_page', '0' ) ); if ( 0 == $featured_page_1 && 0 == $featured_page_2 && 0 == $featured_page_3 ) { return; } ?> '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( 'executive_categories', $all_the_cool_cats ); } if ( $all_the_cool_cats > 1 ) { // This blog has more than 1 category so executive_categorized_blog should return true. return true; } else { // This blog has only 1 category so executive_categorized_blog should return false. return false; } } /** * Flush out the transients used in executive_categorized_blog. */ function executive_category_transient_flusher() { if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { return; } // Like, beat it. Dig? delete_transient( 'executive_categories' ); } add_action( 'edit_category', 'executive_category_transient_flusher' ); add_action( 'save_post', 'executive_category_transient_flusher' );