comment_type ) : case 'pingback' : case 'trackback' : ?>
  • id="li-comment-">
    comment_approved == '0' ) : ?>
    1, ) ); // Count the number of categories that are attached to the posts $all_the_cool_cats = is_countable( $all_the_cool_cats ) ? count( $all_the_cool_cats ) : 0; set_transient( 'all_the_cool_cats', $all_the_cool_cats ); } if ( '1' != $all_the_cool_cats ) { // This blog has more than 1 category so ideation_categorized_blog should return true return true; } else { // This blog has only 1 category so ideation_categorized_blog should return false return false; } } /** * Flush out the transients used in ideation_categorized_blog * * @since Ideation and Intent 1.0 */ function ideation_category_transient_flusher() { // Like, beat it. Dig? delete_transient( 'all_the_cool_cats' ); } add_action( 'edit_category', 'ideation_category_transient_flusher' ); add_action( 'save_post', 'ideation_category_transient_flusher' ); /** * Dynamic classes for the menu wrapper. * * @since Ideation and Intent 1.0 */ function ideation_menu_class( $classes ) { $classes = explode( ' ', $classes ); $classes = array_map( 'trim', $classes ); $header_image = get_header_image(); if ( ! empty( $header_image ) ) $classes[] = 'main-navigation-lone'; $classes = array_map( 'esc_attr', $classes ); print 'class="' . implode( ' ', $classes ) . '"'; } /** * Get Background color for use in CSS. * * @since Ideation and Intent 1.0 */ function ideation_get_background_color() { $background_color = get_background_color(); if ( empty( $background_color ) ) $background_color = get_theme_support( 'custom-background', 'default-color' ); if ( empty( $background_color ) ) $background_color = 'transparent'; else $background_color = '#' . $background_color; return $background_color; } /** * Return the featured image or the first attached image. * * @return string|bool HTML img tag if found; false if no image could be found. * @since Ideation and Intent 1.0 */ function ideation_get_featured_image( $size = 'ideation-thumbnail-rectangle' ) { $featured_image = get_the_post_thumbnail( get_the_ID(), $size ); if ( ! empty( $featured_image ) ) return $featured_image; $images = get_children( array( 'post_parent' => get_the_ID(), 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID', ) ); if ( is_array( $images ) ) $images = array_values( $images ); if ( isset( $images[0]->ID ) ) return wp_get_attachment_image( $images[0]->ID, $size, false, array( 'class' => 'wp-post-image' ) ); return false; }