Make WordPress Core

Changeset 25329


Ignore:
Timestamp:
09/10/2013 10:22:34 PM (11 years ago)
Author:
wonderboymusic
Message:

Add an additional available param (the WP_User instance) to the user_has_cap filter.

Props Viper007Bond.
Fixes #24490.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/capabilities.php

    r25177 r25329  
    937937
    938938        // Must have ALL requested caps
    939         $capabilities = apply_filters( 'user_has_cap', $this->allcaps, $caps, $args );
     939        $capabilities = apply_filters( 'user_has_cap', $this->allcaps, $caps, $args, $this );
    940940        $capabilities['exist'] = true; // Everyone is allowed to exist
    941941        foreach ( (array) $caps as $cap ) {
Note: See TracChangeset for help on using the changeset viewer.