Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/09/2016 10:53:16 PM (8 years ago)
Author:
johnjamesjacoby
Message:

Roles: Fix infinite loops from load order changes in WordPress 4.7.

  • Do not translate "role names" which are actually role IDs
  • Add dummy function so literal role names are part of the pomo dictionary
  • Introduce common/locale.php for future localization code
  • Introduce bbp_translate_user_role() to help with outputting literal role names in the proper language

See #3017. 2.5 branch (for 2.5.11)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/includes/core/sub-actions.php

    r5023 r6120  
    137137 *
    138138 * @since bbPress (r2695)
    139  * @uses did_action() To make sure the user isn't loaded out of order
    140139 * @uses do_action() Calls 'bbp_setup_current_user'
    141140 */
    142141function bbp_setup_current_user() {
    143 
    144     // If the current user is being setup before the "init" action has fired,
    145     // strange (and difficult to debug) role/capability issues will occur.
    146     if ( ! did_action( 'after_setup_theme' ) ) {
    147         _doing_it_wrong( __FUNCTION__, __( 'The current user is being initialized without using $wp->init().', 'bbpress' ), '2.3' );
    148     }
    149 
    150142    do_action( 'bbp_setup_current_user' );
    151143}
Note: See TracChangeset for help on using the changeset viewer.