Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/19/2019 09:04:15 PM (6 years ago)
Author:
johnjamesjacoby
Message:

Capabilities: break instead of return.

This commit ensures that the relative _meta_caps filters continue to be executed within their expected contexts.

Previous to this change, certain mapped capability checks would bail out early and return $caps without the ability to filter the results.

With this change, mapped capabilities can now be filtered more logically and inline with the rest of the surrounding logic.

For 2.7, trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/replies/capabilities.php

    r6921 r6975  
    6060                // Bail if no post ID
    6161                if ( empty( $args[0] ) ) {
    62                     return $caps;
     62                    break;
    6363                }
    6464
     
    133133            // Bail if no post ID
    134134            if ( empty( $args[0] ) ) {
    135                 return $caps;
     135                break;
    136136            }
    137137
     
    181181            // Bail if no post ID
    182182            if ( empty( $args[0] ) ) {
    183                 return $caps;
     183                break;
    184184            }
    185185
Note: See TracChangeset for help on using the changeset viewer.