WordPress.org

Make WordPress Core

Ticket #14998: 14998.diff

File 14998.diff, 621 bytes (added by coffee2code, 8 years ago)

Aforementioned patch.

  • wp-includes/capabilities.php

     
    735735                        return true;
    736736                }
    737737
     738                // If supplied caps contains FALSE or TRUE then return that boolean without checking other caps.
     739                if ( in_array( false, $caps, true ) )
     740                        return false;
     741                if ( in_array( true, $caps, true ) )
     742                        return true;
     743
    738744                // Must have ALL requested caps
    739745                $capabilities = apply_filters( 'user_has_cap', $this->allcaps, $caps, $args );
    740746                foreach ( (array) $caps as $cap ) {