Make WordPress Core

Ticket #23377: 23377.patch

File 23377.patch, 577 bytes (added by wpsmith, 13 years ago)

First pass.

  • wp-includes/capabilities.php

     
    993993function map_meta_cap( $cap, $user_id ) {
    994994        $args = array_slice( func_get_args(), 2 );
    995995        $caps = array();
    996 
     996       
     997        if ( ! isset( $args[0] ) ) {
     998                global $post;
     999                if ( is_object( $post ) ) {
     1000                        $args[0] = $post->ID;
     1001                }
     1002                else {
     1003                        $args[0] = $_POST['post_ID'];
     1004                }
     1005        }
     1006       
    9971007        switch ( $cap ) {
    9981008        case 'remove_user':
    9991009                $caps[] = 'remove_users';