Skip to:
Content

bbPress.org


Ignore:
Timestamp:
12/09/2016 07:30:14 AM (9 years ago)
Author:
johnjamesjacoby
Message:

Roles: Port bbp_roles_init() from trunk to 2.5 branch. See: #3028.

File:
1 edited

Legend:

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

    r5643 r6147  
    4646add_action( 'wp_head',                  'bbp_head',                   10    );
    4747add_action( 'wp_footer',                'bbp_footer',                 10    );
     48add_action( 'wp_roles_init',            'bbp_roles_init',             10    );
    4849add_action( 'set_current_user',         'bbp_setup_current_user',     10    );
    4950add_action( 'setup_theme',              'bbp_setup_theme',            10    );
     
    8586
    8687/**
    87  * There is no action API for roles to use, so hook in immediately after
    88  * everything is included (including the theme's functions.php. This is after
    89  * the $wp_roles global is set but before $wp->init().
    90  *
    91  * If it's hooked in any sooner, role names may not be translated correctly.
    92  *
    93  * @link http://bbpress.trac.wordpress.org/ticket/2219
    94  *
    95  * This is kind of lame, but is all we have for now.
    96  */
    97 add_action( 'bbp_after_setup_theme', 'bbp_add_forums_roles', 1 );
     88 * bbp_roles_init - Attached to 'wp_roles_init' above
     89 */
     90add_action( 'bbp_roles_init', 'bbp_add_forums_roles', 1 );
    9891
    9992/**
Note: See TracChangeset for help on using the changeset viewer.