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/capabilities.php

    r5064 r6120  
    378378        // Keymaster
    379379        bbp_get_keymaster_role() => array(
    380             'name'         => __( 'Keymaster', 'bbpress' ),
     380            'name'         => 'Keymaster',
    381381            'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() )
    382382        ),
     
    384384        // Moderator
    385385        bbp_get_moderator_role() => array(
    386             'name'         => __( 'Moderator', 'bbpress' ),
     386            'name'         => 'Moderator',
    387387            'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() )
    388388        ),
     
    390390        // Participant
    391391        bbp_get_participant_role() => array(
    392             'name'         => __( 'Participant', 'bbpress' ),
     392            'name'         => 'Participant',
    393393            'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() )
    394394        ),
     
    396396        // Spectator
    397397        bbp_get_spectator_role() => array(
    398             'name'         => __( 'Spectator', 'bbpress' ),
     398            'name'         => 'Spectator',
    399399            'capabilities' => bbp_get_caps_for_role( bbp_get_spectator_role() )
    400400        ),
     
    402402        // Blocked
    403403        bbp_get_blocked_role() => array(
    404             'name'         => __( 'Blocked', 'bbpress' ),
     404            'name'         => 'Blocked',
    405405            'capabilities' => bbp_get_caps_for_role( bbp_get_blocked_role() )
    406406        )
Note: See TracChangeset for help on using the changeset viewer.