Skip to:
Content

bbPress.org


Ignore:
Timestamp:
10/09/2012 06:52:38 PM (12 years ago)
Author:
johnjamesjacoby
Message:

Capabilities:

  • Introduce sub-action for saving a users profile.
  • Hook capability saving functions to this new action.
  • Remove duplicate admin routine from /bbp-admin/bbp-users.php.
  • Remove hardcoded capability saving from bbp_edit_user_handler().
  • Add edit_user capability checks to cap save and reset functions.
  • Fixes bug when caps would be lost when a user saves their own profile.
  • Fixes #1963.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bbp-includes/bbp-core-actions.php

    r4223 r4236  
    3939 * near the bottom of this file.
    4040 *
    41  *           v--WordPress Actions      v--bbPress Sub-actions
    42  */
    43 add_action( 'plugins_loaded',         'bbp_loaded',                 10 );
    44 add_action( 'init',                   'bbp_init',                   0  ); // Early for bbp_register
    45 add_action( 'parse_query',            'bbp_parse_query',            2  ); // Early for overrides
    46 add_action( 'widgets_init',           'bbp_widgets_init',           10 );
    47 add_action( 'generate_rewrite_rules', 'bbp_generate_rewrite_rules', 10 );
    48 add_action( 'wp_enqueue_scripts',     'bbp_enqueue_scripts',        10 );
    49 add_action( 'wp_head',                'bbp_head',                   10 );
    50 add_action( 'wp_footer',              'bbp_footer',                 10 );
    51 add_action( 'set_current_user',       'bbp_setup_current_user',     10 );
    52 add_action( 'setup_theme',            'bbp_setup_theme',            10 );
    53 add_action( 'after_setup_theme',      'bbp_after_setup_theme',      10 );
    54 add_action( 'template_redirect',      'bbp_template_redirect',      10 );
    55 add_action( 'login_form_login',       'bbp_login_form_login',       10 );
     41 *           v--WordPress Actions        v--bbPress Sub-actions
     42 */
     43add_action( 'plugins_loaded',           'bbp_loaded',                   10 );
     44add_action( 'init',                     'bbp_init',                     0  ); // Early for bbp_register
     45add_action( 'parse_query',              'bbp_parse_query',              2  ); // Early for overrides
     46add_action( 'widgets_init',             'bbp_widgets_init',             10 );
     47add_action( 'generate_rewrite_rules',   'bbp_generate_rewrite_rules',   10 );
     48add_action( 'wp_enqueue_scripts',       'bbp_enqueue_scripts',          10 );
     49add_action( 'wp_head',                  'bbp_head',                     10 );
     50add_action( 'wp_footer',                'bbp_footer',                   10 );
     51add_action( 'set_current_user',         'bbp_setup_current_user',       10 );
     52add_action( 'setup_theme',              'bbp_setup_theme',              10 );
     53add_action( 'after_setup_theme',        'bbp_after_setup_theme',        10 );
     54add_action( 'template_redirect',        'bbp_template_redirect',        10 );
     55add_action( 'login_form_login',         'bbp_login_form_login',         10 );
     56add_action( 'edit_user_profile_update', 'bbp_edit_user_profile_update', 10 );
    5657
    5758/**
     
    221222
    222223// User status
     224// @todo make these sub-actions
    223225add_action( 'make_ham_user',  'bbp_make_ham_user'  );
    224226add_action( 'make_spam_user', 'bbp_make_spam_user' );
     227
     228// User capabilities
     229add_action( 'bbp_edit_user_profile_update', 'bbp_edit_user_profile_update_capabilities' );
    225230
    226231// Caches
     
    236241 *
    237242 * 1. Form submission within a theme (new and edit)
    238  * 2. Accessing private or hidden forums
     243 * 2. Accessing private or hidden content (forums/topics/replies)
    239244 * 3. Editing forums, topics, replies, users, and tags
    240245 */
Note: See TracChangeset for help on using the changeset viewer.