• > comment_ID, $args);} ?>
    user_id ); ?>
    comment_approved == '0' ) : ?>

    *' : '' ); $commenter = wp_get_current_commenter(); $fields = array( 'author' => '

    ', 'email' => '

    ', 'url' => '

    ', ); $fields = apply_filters( 'graphene_comment_form_fields', $fields ); return $fields; } /** * Modify default comment parameters * * @package Graphene * @since Graphene 1.9 */ function graphene_comment_args( $defaults ){ $args = array( 'comment_field' => '

    ', ); return array_merge( $defaults, $args ); } // Clear function graphene_comment_clear(){ echo '
    '; } // Add all the filters we defined add_filter( 'comment_form_default_fields', 'graphene_comment_form_fields' ); add_filter( 'comment_form_defaults', 'graphene_comment_args', 5 ); add_filter( 'comment_form', 'graphene_comment_clear', 1000 ); if ( ! function_exists( 'graphene_get_comment_count' ) ) : /** * Adds the functionality to count comments by type, eg. comments, pingbacks, tracbacks. * Based on the code at WPCanyon (http://wpcanyon.com/tipsandtricks/get-separate-count-for-comments-trackbacks-and-pingbacks-in-wordpress/) * * In Graphene version 1.3 the $noneText param has been removed * * @package Graphene * @since Graphene 1.3 */ function graphene_comment_count( $type = 'comments', $oneText = '', $moreText = '' ){ $result = graphene_get_comment_count( $type ); if( $result == 1 ) return str_replace( '%', $result, $oneText ); elseif( $result > 1 ) return str_replace( '%', $result, $moreText ); else return false; } endif; if ( ! function_exists( 'graphene_get_comment_count' ) ) : /** * Adds the functionality to count comments by type, eg. comments, pingbacks, tracbacks. Return the number of comments, but do not print them. * Based on the code at WPCanyon (http://wpcanyon.com/tipsandtricks/get-separate-count-for-comments-trackbacks-and-pingbacks-in-wordpress/) * * In Graphene version 1.3 the $noneText param has been removed * * @package Graphene * @since Graphene 1.3 */ function graphene_get_comment_count( $type = 'comments', $only_approved_comments = true, $top_level = false ){ if ( ! get_the_ID() ) return; if ( $type == 'comments' ) $type_sql = 'comment_type = ""'; elseif ( $type == 'pings' ) $type_sql = 'comment_type != ""'; elseif ( $type == 'trackbacks' ) $type_sql = 'comment_type = "trackback"'; elseif ( $type == 'pingbacks' ) $type_sql = 'comment_type = "pingback"'; $type_sql = apply_filters( 'graphene_comments_typesql', $type_sql, $type ); $approved_sql = $only_approved_comments ? ' AND comment_approved="1"' : ''; $top_level_sql = ( $top_level ) ? ' AND comment_parent="0" ' : ''; global $wpdb; $result = $wpdb->get_var( ' SELECT COUNT(comment_ID) FROM ' . $wpdb->comments . ' WHERE ' . $type_sql . $approved_sql . $top_level_sql . ' AND comment_post_ID= ' . get_the_ID() ); return $result; } endif; if ( ! function_exists( 'graphene_should_show_comments' ) ) : /** * Helps to determine if the comments should be shown. */ function graphene_should_show_comments() { global $graphene_settings, $post; if ( ! isset( $post ) ) return; if ( $graphene_settings['comments_setting'] == 'disabled_completely' ) return false; if ( $graphene_settings['comments_setting'] == 'disabled_pages' && get_post_type( $post->ID ) == 'page' ) return false; if ( ! is_singular() && $graphene_settings['hide_post_commentcount'] ) return false; if ( ! comments_open() && ! is_singular() && get_comments_number( $post->ID ) == 0 ) return false; return true; } endif; /** * Delete and mark spam link for comments. Show only if current user can moderate comments */ if ( ! function_exists( 'graphene_moderate_comment' ) ) : function graphene_moderate_comment( $id ) { $html = '| ' . __( 'Delete', 'graphene' ) . ''; $html .= ' '; $html .= '| ' . __( 'Spam', 'graphene' ) . ' |'; if ( current_user_can( 'moderate_comments' ) ) echo $html; } endif; if ( ! function_exists( 'graphene_comments_nav' ) ) : /** * Display comments pagination * * @package Graphene * @since 1.9 */ function graphene_comments_nav(){ global $graphene_settings, $is_paginated; if ( get_comment_pages_count() > 1 && $is_paginated ) : ?>

    display_name, '' , '' ); } else { $author_link = get_comment_author_link(); } return apply_filters( 'graphene_comment_author_link', $author_link ); } endif;