Changeset 6105
- Timestamp:
- 11/01/2016 04:07:58 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/core/sub-actions.php
r6046 r6105 150 150 * Setup the currently logged-in user 151 151 * 152 * We white-list the WordPress customizer which purposely loads the user early.153 *154 152 * @link https://bbpress.trac.wordpress.org/ticket/2309 155 153 * @link https://core.trac.wordpress.org/ticket/24169 … … 157 155 * @since 2.0.0 bbPress (r2695) 158 156 * 159 * @uses did_action() To make sure the user isn't loaded out of order160 157 * @uses do_action() Calls 'bbp_setup_current_user' 161 158 */ 162 159 function 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 172 160 do_action( 'bbp_setup_current_user' ); 173 161 }
Note: See TracChangeset
for help on using the changeset viewer.