Skip to:
Content

bbPress.org

Changeset 6105


Ignore:
Timestamp:
11/01/2016 04:07:58 AM (8 years ago)
Author:
johnjamesjacoby
Message:

User: Remove _doing_it_wrong() notice from bbp_setup_current_user().

The current user is always bootstrapped early in WordPress 4.7, so this notice is no longer valid.

An update for bootstrapping dynamic roles is imminent.

See #2309.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/core/sub-actions.php

    r6046 r6105  
    150150 * Setup the currently logged-in user
    151151 *
    152  * We white-list the WordPress customizer which purposely loads the user early.
    153  *
    154152 * @link https://bbpress.trac.wordpress.org/ticket/2309
    155153 * @link https://core.trac.wordpress.org/ticket/24169
     
    157155 * @since 2.0.0 bbPress (r2695)
    158156 *
    159  * @uses did_action() To make sure the user isn't loaded out of order
    160157 * @uses do_action() Calls 'bbp_setup_current_user'
    161158 */
    162159function bbp_setup_current_user() {
    163 
    164     // If the current user is being setup before the "init" action has fired,
    165     // strange (and difficult to debug) role/capability issues will occur.
    166     if ( ! isset( $GLOBALS['wp_customize'] ) && ! did_action( 'after_setup_theme' ) ) {
    167         $e = new Exception;
    168         $trace = $e->getTraceAsString();
    169         _doing_it_wrong( __FUNCTION__, __( 'The current user is being initialized without using $wp->init().', 'bbpress' ) . "\n===\nTrace:\n" . substr( $trace, strpos( $trace, '#6' ) ) . "\n===\n", '2.3' );
    170     }
    171 
    172160    do_action( 'bbp_setup_current_user' );
    173161}
Note: See TracChangeset for help on using the changeset viewer.