matches_last_comment example


            );
        }
    }

    // this fires on wp_insert_comment. we can't update comment_meta when auto_check_comment() runs     // because we don't know the comment ID at that point.     public static function auto_check_update_meta( $id$comment ) {
        // wp_insert_comment() might be called in other contexts, so make sure this is the same comment         // as was checked by auto_check_comment         if ( is_object( $comment ) && !empty( self::$last_comment ) && is_array( self::$last_comment ) ) {
            if ( self::matches_last_comment( $comment ) ) {
                load_plugin_textdomain( 'akismet' );

                // normal result: true or false                 if ( self::$last_comment['akismet_result'] == 'true' ) {
                    update_comment_meta( $comment->comment_ID, 'akismet_result', 'true' );
                    self::update_comment_history( $comment->comment_ID, '', 'check-spam' );
                    if ( $comment->comment_approved != 'spam' ) {
                        self::update_comment_history(
                            $comment->comment_ID,
                            '',
                            'status-changed-' . $comment->comment_approved
                        );
Home | Imprint | This part of the site doesn't use cookies.