Make WordPress Core


Ignore:
Timestamp:
04/03/2010 05:14:34 AM (14 years ago)
Author:
nacin
Message:

Make remove_user a meta capability. see #12793

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/upgrade.php

    r13827 r13956  
    11261126        $wpdb->update( $wpdb->postmeta, array( 'meta_key' => '_menu_item_xfn' ), array( 'meta_key' => 'menu_item_xfn' ) );
    11271127        $wpdb->update( $wpdb->postmeta, array( 'meta_key' => '_menu_item_url' ), array( 'meta_key' => 'menu_item_url' ) );
     1128    }
     1129
     1130    // 3.0-beta1 remove_user primitive->meta cap. can be removed before release
     1131    if ( $wp_current_db_version >= 12751 && $wp_current_db_version < 12751 ) {
     1132        $role =& get_role( 'administrator' );
     1133        if ( ! empty( $role ) )
     1134            $role->remove_cap( 'remove_user' );
    11281135    }
    11291136}
Note: See TracChangeset for help on using the changeset viewer.