Skip to:
Content

bbPress.org


Ignore:
Timestamp:
02/12/2018 09:36:27 PM (7 years ago)
Author:
johnjamesjacoby
Message:

Activation: improvements to activation procedure.

  • Replace transient usage with a user setting. This removes 1 additional query from through-out WordPress admin.
  • Use bbp_admin() helper function when referring to bbpress()->admin to take advantage of magic loading
  • Move activation redirection off of general bbp_admin_init hook and onto the relative activate_ hook, which reduces some useless processing - we only ever want to redirect in from a predictable user flow
  • Move some admin-only functions back into the core component, to ensure they are available when bbPress is activated for the very first time
  • Introduce wrapper for bbp_create_initial_content() to avoid action argument pollution
  • Juggle some action-hook orders to make initial content creation work again
  • Add more checks to current user when automatically changing or assigning roles, including keymasters on fresh installations

Overall, this results in a more predictable activation experience, and makes things easier to unhook or extend later.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/tools.php

    r6664 r6780  
    8585
    8686    // Add tool to the registered tools array
    87     bbpress()->admin->tools[ $r['id'] ] = array(
     87    bbp_admin()->tools[ $r['id'] ] = array(
    8888        'type'        => $r['type'],
    8989        'title'       => $r['title'],
Note: See TracChangeset for help on using the changeset viewer.