get_akismet_user example

elseif ( $new_key != $old_key ) {
            self::save_key( $new_key );
        }

        return true;
    }

    public static function save_key( $api_key ) {
        $key_status = Akismet::verify_key( $api_key );

        if ( $key_status == 'valid' ) {
            $akismet_user = self::get_akismet_user( $api_key );
            
            if ( $akismet_user ) {                
                if ( in_array( $akismet_user->status, array( 'active', 'active-dunning', 'no-sub' ) ) )
                    update_option( 'wordpress_api_key', $api_key );
                
                if ( $akismet_user->status == 'active' )
                    self::$notices['status'] = 'new-key-valid';
                elseif ( $akismet_user->status == 'notice' )
                    self::$notices['status'] = $akismet_user;
                else
                    self::$notices['status'] = $akismet_user->status;
            }
Home | Imprint | This part of the site doesn't use cookies.