1 ) { $number = str_replace( '%', number_format_i18n( $count ), $many ); } elseif ( $count == 1 ) { $number = $one; } else { // it must be one $number = $none; } // Now let's format this badboy. $tag = apply_filters( 'evolve_discussion_title_tag', (string) 'h3' ); // Available filter: evolve_discussion_title_tag if ( $number ) { $discussion_title = '<'. $tag .' class="'. $type .'-title">'; $discussion_title .= '' . $number . ''; $discussion_title .= ''; } $evolve_discussion_title = apply_filters( 'evolve_discussion_title', (string) $discussion_title ); // Available filter: evolve_discussion_title return ( $echo ) ? print( $evolve_discussion_title ) : $evolve_discussion_title; } /** * evolve_discussion_rss() * * @since 0.3 * @needsdoc */ function evolve_discussion_rss() { global $id; $uri = get_post_comments_feed_link( $id ); $text = ""; echo $text; } /** * evolve_count() * * @since 0.3 * @needsdoc */ function evolve_count( $type = NULL, $echo = true ) { if ( !$type ) return; global $wp_query; $comment_count = count( $wp_query->comments_by_type['comment'] ); $ping_count = count( $wp_query->comments_by_type['trackback'] ); switch ( $type ): case 'comment': return ( $echo ) ? print( $comment_count ) : $comment_count; break; case 'pings': return ( $echo ) ? print( $ping_count ) : $ping_count; break; endswitch; } /** * evolve_comment_author() short description * * @since 0.3 * @todo needs filter */ function evolve_comment_author( $meta_format = '%avatar% %name%' ) { $meta_format = apply_filters( 'evolve_comment_author_meta_format', $meta_format ); // Available filter: evolve_comment_author_meta_format if ( ! $meta_format ) return; // No keywords to replace if ( strpos( $meta_format, '%' ) === false ) { echo $meta_format; } else { $open = '' . "\n"; $open .= '
' . "\n"; $close = "\n" . '' . "\n"; $close .= '
' . "\n"; // separate the %keywords% $meta_array = preg_split( '/(%.+?%)/', $meta_format, -1, PREG_SPLIT_DELIM_CAPTURE ); // parse through the keywords foreach ( $meta_array as $key => $str ) { switch ( $str ) { case '%avatar%': $meta_array[$key] = evolve_comment_avatar(); break; case '%name%': $meta_array[$key] = evolve_comment_name(); break; } } $output = join( '', $meta_array ); if ( $output ) echo $open . $output . $close; // output the result } } /** * evolve_comment_meta() short description * * @since 0.3.1 * @todo needs filter */ function evolve_comment_meta( $meta_format = '%date% at %time% | %link% %edit%' ) { $meta_format = apply_filters( 'evolve_comment_meta_format', $meta_format ); // Available filter: evolve_comment_meta_format if ( ! $meta_format ) return; // No keywords to replace if ( strpos( $meta_format, '%' ) === false ) { echo $meta_format; } else { $open = '' . "\n"; $open .= '
' . "\n"; $close = "\n" . '' . "\n"; $close .= '
' . "\n"; // separate the %keywords% $meta_array = preg_split( '/(%.+?%)/', $meta_format, -1, PREG_SPLIT_DELIM_CAPTURE ); // parse through the keywords foreach ( $meta_array as $key => $str ) { switch ( $str ) { case '%date%': $meta_array[$key] = evolve_comment_date(); break; case '%time%': $meta_array[$key] = evolve_comment_time(); break; case '%link%': $meta_array[$key] = evolve_comment_link(); break; case '%reply%': $meta_array[$key] = evolve_comment_reply( true ); break; case '%edit%': $meta_array[$key] = evolve_comment_edit(); break; } } $output = join( '', $meta_array ); if ( $output ) echo $open . $output . $close; // output the result } } /** * evolve_comment_text() short description * * @since 0.3.1 */ function evolve_comment_text() { echo "\n\n"; echo "
\n"; comment_text(); echo "\n\n"; echo "
\n"; } /** * evolve_comment_moderation() short description * * @since - 0.3.1 */ function evolve_comment_moderation() { global $comment; if ( $comment->comment_approved == '0' ) echo '

Your comment is awaiting moderation

'; } /** * evolve_comment_navigation() paged comments * * @since 0.3 * @needsdoc * @todo add html comments? */ function evolve_comment_navigation() { $num = get_comments_number() + 1; $tag = apply_filters( 'evolve_comment_navigation_tag', (string) 'div' ); // Available filter: evolve_comment_navigation_tag $open = "\n"; $open .= "<". $tag ." class=\"navigation-links comment-navigation\">\n"; $close = "\n"; $close .= "\n"; if ( $num > get_option( 'comments_per_page' ) ) { $paged_links = paginate_comments_links( array( 'type' => 'array', 'echo' => false, 'prev_text' => '« Previous Page', 'next_text' => 'Next Page »' ) ); if ( $paged_links ) $comment_navigation = $open . join( ' ', $paged_links ) . $close; } else { $comment_navigation = NULL; } echo apply_filters( 'evolve_comment_navigation', (string) $comment_navigation ); // Available filter: evolve_comment_navigation } /** * evolve_comments_callback() recreate the comment list * * @since 0.3 * @needsdoc */ function evolve_comments_callback( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; $GLOBALS['comment_depth'] = $depth; $tag = apply_filters( 'evolve_comments_list_tag', (string) 'li' ); // Available filter: evolve_comments_list_tag ?> < class="" id="comment-"> \n"; echo "\n"; do_action( 'evolve_hook_inside_comments_loop' ); // Available action: evolve_hook_inside_comments_loop } /** * evolve_pings_callback() recreate the comment list * * @since 0.3 * @needsdoc */ function evolve_pings_callback( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; $tag = apply_filters( 'evolve_pings_callback_tag', (string) 'li' ); // Available filter: evolve_pings_callback_tag $time = apply_filters( 'evolve_pings_callback_time', (string) ' on ' ); // Available filter: evolve_pings_callback_time $when = apply_filters( 'evolve_pings_callback_when', (string) ' at ' ); // Available filter: evolve_pings_callback_time ?> comment_approved == '0' ) echo '

Your trackback is awaiting moderation.

\n'; ?> < class="" id="ping-comment_ID; ?>"> \n"; echo "\n"; do_action( 'evolve_hook_inside_pings_list' ); // Available action: evolve_hook_inside_pings_list } ?>