Make WordPress Core

Changeset 2576


Ignore:
Timestamp:
04/27/2005 11:55:06 PM (22 years ago)
Author:
ryan
Message:

Fix comment auto-approval for authors/admins. ​http://mosquito.wordpress.org/view.php?id=1291 Props: kim, coffee2code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions-post.php

    r2561 r2576  
    503503        }
    504504
    505         if ( check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $comment_type) )
     505        if ( $userdata && ( $user_id == $post_author || $userdata->user_level >= 9 ) ) {
    506506                $approved = 1;
    507         else
    508                 $approved = 0;
    509         if ( wp_blacklist_check($author, $email, $url, $comment, $user_ip, $user_agent) )
    510                 $approved = 'spam';
    511         if ( $userdata && ( $user_id == $post_author || $userdata['user_level'] >= 9 ) )
    512                 $approved = 1;
     507        } else {
     508                if ( check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $comment_type) )
     509                        $approved = 1;
     510                else
     511                        $approved = 0;
     512                if ( wp_blacklist_check($author, $email, $url, $comment, $user_ip, $user_agent) )
     513                        $approved = 'spam';
     514        }
    513515
    514516        $approved = apply_filters('pre_comment_approved', $approved);
Note: See TracChangeset for help on using the changeset viewer.