Changeset 11223
- Timestamp:
- 11/03/2016 08:47:31 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.7/src/bp-core/bp-core-dependency.php
r10899 r11223 208 208 * Set up the currently logged-in user. 209 209 * 210 * We white-list the WordPress Customizer which purposely loads the user early.211 * If the current user is being setup before the "init" action has fired,212 * strange (and difficult to debug) role/capability issues will occur.213 *214 210 * @since 1.7.0 215 211 * … … 218 214 */ 219 215 function bp_setup_current_user() { 220 $skip_warning = (221 ( isset( $_REQUEST['wp_customize'] ) && 'on' === $_REQUEST['wp_customize'] ) ||222 ( is_admin() && 'customize.php' === basename( $_SERVER['PHP_SELF'] ) )223 );224 225 if ( ! $skip_warning && ! did_action( 'after_setup_theme' ) ) {226 $e = new Exception;227 $trace = $e->getTraceAsString();228 229 _doing_it_wrong( __FUNCTION__, __( 'The current user is being initialized without using $wp->init().', 'buddypress' ) . "\n===\nTrace:\n" . substr( $trace, strpos( $trace, '#6' ) ) . "\n===\n", '1.7' );230 }231 216 232 217 /**
Note: See TracChangeset
for help on using the changeset viewer.