' . __( 'Sticky', 'beryl' ) . ''; // } // Set up and print post meta information. printf( '', esc_url( get_permalink() ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_url( get_author_posts_url( $post->post_author ) ), get_the_author_meta( 'display_name' , $post->post_author) ); } endif; /** * Find out if blog has more than one category. * * @since Beryl 1.0 * * @return boolean true if blog has more than 1 category */ function beryl_categorized_blog() { if ( false === ( $all_the_cool_cats = get_transient( 'beryl_category_count' ) ) ) { // 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( 'beryl_category_count', $all_the_cool_cats ); } if ( 1 !== (int) $all_the_cool_cats ) { // This blog has more than 1 category so beryl_categorized_blog should return true return true; } else { // This blog has only 1 category so beryl_categorized_blog should return false return false; } } /** * Flush out the transients used in beryl_categorized_blog. * * @since Beryl 1.0 * * @return void */ function beryl_category_transient_flusher() { // Like, beat it. Dig? delete_transient( 'beryl_category_count' ); } add_action( 'edit_category', 'beryl_category_transient_flusher' ); add_action( 'save_post', 'beryl_category_transient_flusher' ); /** * Display an optional post thumbnail. * * Wraps the post thumbnail in an anchor element on index * views, or a div element when on single views. * * @since Beryl 1.0 * * @return void */ function beryl_post_thumbnail() { if ( post_password_required() || ! has_post_thumbnail() ) { return; } if ( is_single() ) : ?>