' . esc_html( get_the_author() ) . '' ); echo ' ' . $byline . ''; } endif; // ends check for accessiblezen_author if ( ! function_exists( 'accessiblezen_posted_on' ) ) : /** * Prints HTML with meta information for the current post date/time. * * @since accessiblezen 1.0 */ function accessiblezen_posted_on() { $time_string = ''; 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( 'Posted: %s', 'post date', 'accessiblezen' ), '' . $time_string . '.' ); echo '' . $posted_on . ''; } endif; // ends check for accessiblezen_posted_on if ( ! function_exists( 'accessiblezen_archive_page_title_etc' ) ): /** * Display info for the page title on the archive page * * @since accessiblezen 1.0 */ function accessiblezen_archive_page_title_etc() { if ( is_category() ) : single_cat_title(); elseif ( is_tag() ) : single_tag_title(); elseif ( is_author() ) : /* Queue the first post, that way we know * what author we're dealing with (if that is the case). */ the_post(); printf( __( 'Author: %s', 'accessiblezen' ), '' . get_the_author() . '' ); /* Since we called the_post() above, we need to * rewind the loop back to the beginning that way * we can run the loop properly, in full. */ rewind_posts(); elseif ( is_day() ) : printf( __( 'Day: %s', 'accessiblezen' ), '' . get_the_date() . '' ); elseif ( is_month() ) : printf( __( 'Month: %s', 'accessiblezen' ), '' . get_the_date( 'F Y' ) . '' ); elseif ( is_year() ) : printf( __( 'Year: %s', 'accessiblezen' ), '' . get_the_date( 'Y' ) . '' ); elseif ( is_tax( 'post_format', 'post-format-aside' ) ) : _e( 'Asides', 'accessiblezen' ); elseif ( is_tax( 'post_format', 'post-format-audio' ) ) : _e( 'Audios', 'accessiblezen' ); elseif ( is_tax( 'post_format', 'post-format-chat' ) ) : _e( 'Chats', 'accessiblezen' ); elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) : _e( 'Galleries', 'accessiblezen' ); elseif ( is_tax( 'post_format', 'post-format-image' ) ) : _e( 'Images', 'accessiblezen'); elseif ( is_tax( 'post_format', 'post-format-status' ) ) : _e( 'Statuses', 'accessiblezen' ); elseif ( is_tax( 'post_format', 'post-format-video' ) ) : _e( 'Videos', 'accessiblezen' ); elseif ( is_tax( 'post_format', 'post-format-quote' ) ) : _e( 'Quotes', 'accessiblezen' ); elseif ( is_tax( 'post_format', 'post-format-link' ) ) : _e( 'Links', 'accessiblezen' ); elseif ( is_post_type_archive() ) : printf( __( '%s', 'accessiblezen' ), '' . post_type_archive_title() . '' ); elseif ( is_tax() ) : $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); printf( __( '%s', 'accessiblezen' ), '' . $term->name . '' ); else : _e( 'Archives', 'accessiblezen' ); endif; } endif; // ends check for accessiblezen_archive_page_title_etc if ( ! function_exists( 'accessiblezen_term_description' ) ): /** * Display optional term description for category, tag and custom taxonomy pages. * * @since accessiblezen 1.1.1 */ function accessiblezen_term_description() { // Show an optional term description. $term_description = term_description(); if ( is_category() || is_tag || is_tax && ! empty( $term_description ) ) : printf( '
%s
', $term_description, 'accessiblezen' ); endif; } endif; // ends check for accessiblezen_term_description if ( ! function_exists( 'accessiblezen_cats_and_tags' ) ) : /** * Prints HTML with information for the categories and tags. * * @since accessiblezen 1.0 */ function accessiblezen_cats_and_tags() { /* translators: used between list items, there is a space after the comma */ $category_list = get_the_category_list( __( ', ', 'accessiblezen' ) ); /* translators: used between list items, there is a space after the comma */ $tag_list = get_the_tag_list( '', __( ', ', 'accessiblezen' ) ); if ( ! accessiblezen_categorized_blog() ) { // This blog only has 1 category so we just need to worry about tags in the meta text if ( '' != $tag_list ) { $meta_text = __( 'Tagged: %2$s. Bookmark the permalink.', 'accessiblezen' ); } else { $meta_text = __( 'Bookmark the permalink.', 'accessiblezen' ); } } else { // But this blog has loads of categories so we should probably display them here if ( '' != $tag_list ) { $meta_text = __( 'Posted in: %1$s. Tagged: %2$s. Bookmark the permalink.', 'accessiblezen' ); } else { $meta_text = __( 'Posted in: %1$s. Bookmark the permalink.', 'accessiblezen' ); } } // end check for categories on this blog printf( $meta_text, $category_list, $tag_list, get_permalink() ); } endif; // ends check for accessiblezen_cats_and_tags if ( ! function_exists( 'get_post_format_archive_link' ) ): { /** * Prints a link to the Post Format archive page * Use: echo get_post_format_archive_link(); * @since accessiblezen 1.0 */ function get_post_format_archive_link() { $get_post_format_archive_link = sprintf( _x( 'Format: %s', 'post-format-archive-link', 'accessiblezen' ), '' . get_post_format_string( get_post_format() ) . '' ); echo '' . $get_post_format_archive_link . ''; } } endif; // ends check for get_post_format_archive_link if ( ! function_exists( 'get_post_format_icon' ) ): { /** * Prints the markup for the genericon icon font * * @since accessiblezen 1.0 */ function get_post_format_icon() { if ( has_post_format('aside') ) { printf(''); } elseif ( has_post_format('audio') ) { printf(''); } elseif ( has_post_format('chat') ) { printf(''); } elseif ( has_post_format('gallery') ) { printf(''); } elseif ( has_post_format('image') ) { printf(''); } elseif ( has_post_format('link') ) { printf(''); } elseif ( has_post_format('quote') ) { printf(''); } elseif ( has_post_format('standard') ) { printf(''); } elseif ( has_post_format('status') ) { printf(''); } elseif ( has_post_format('video') ) { printf(''); } } } endif; // ends check for get_post_format_icon /** * Returns true if a blog has more than 1 category * * @since accessiblezen 1.0 */ function accessiblezen_categorized_blog() { if ( false === ( $all_the_cool_cats = get_transient( 'all_the_cool_cats' ) ) ) { // Create an array of all the categories that are attached to posts $all_the_cool_cats = get_categories( array( 'hide_empty' => 1, ) ); // Count the number of categories that are attached to the posts $all_the_cool_cats = count( $all_the_cool_cats ); set_transient( 'all_the_cool_cats', $all_the_cool_cats ); } if ( '1' != $all_the_cool_cats ) { // This blog has more than 1 category so accessiblezen_categorized_blog should return true return true; } else { // This blog has only 1 category so accessiblezen_categorized_blog should return false return false; } } /** * Flush out the transients used in accessiblezen_categorized_blog * * @since accessiblezen 1.0 */ function accessiblezen_category_transient_flusher() { // Like, beat it. Dig? delete_transient( 'all_the_cool_cats' ); } add_action( 'edit_category', 'accessiblezen_category_transient_flusher' ); add_action( 'save_post', 'accessiblezen_category_transient_flusher' ); function accessiblezen_credits() { $credits = printf( '

Made with %2$s & %4$s.

', esc_url( 'http://wordpress.org' ), __( 'WordPress', 'accessiblezen' ), esc_url( 'http://davidakennedy.com/projects/accessible-zen' ), __( 'Accessible Zen', 'accessiblezen' ) ); return $credits; }