WordPress.org

Support

Support » Plugins and Hacks » Need a Comments hack

Need a Comments hack

Viewing 2 replies - 1 through 2 (of 2 total)
  • I already found a way to change the hidden input on the comment form’s comment_post_ID value to that of the user id in the url

    Found it!
    If any one else ever has this problem its in line 884 of code in the wp-includes/comments-template.php file

    $comments = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND (comment_approved = '1' OR ( user_id = %d AND comment_approved = '0' ) ) ORDER BY comment_date_gmt",$post->ID , $user_ID));

    Change “$post->ID” to “$_GET[userid]”

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Need a Comments hack’ is closed to new replies.
Skip to toolbar