Make WordPress Core

Ticket #8433: 8433.2.diff

File 8433.2.diff, 687 bytes (added by ryan, 17 years ago)
  • wp-admin/user-edit.php

     
    3939        wp_die( __('Invalid user ID.') );
    4040}
    4141
    42 $all_post_types = apply_filters('all_post_types', array('post', 'page'));
     42$all_post_caps = array('posts', 'pages');
    4343$user_can_edit = false;
    44 foreach ( $all_post_types as $post_type )
    45         $user_can_edit |= current_user_can("edit_$post_type");
     44foreach ( $all_post_caps as $post_cap )
     45        $user_can_edit |= current_user_can("edit_$post_cap");
    4646
    4747/**
    4848 * Optional SSL preference that can be turned on by hooking to the 'personal_options' action.