Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/11/2012 07:14:21 PM (14 years ago)
Author:
johnjamesjacoby
Message:

Activation:

  • When activating bbPress, redirect to the "What's New" page.
  • Replaces incomplete code in /admin/functions.php with update action and activation hook helper.
  • See #2018.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/core/update.php

    r4334 r4390  
    268268    bbp_delete_rewrite_rules();
    269269}
     270
     271/**
     272 * Redirect user to bbPress's What's New page on activation
     273 *
     274 * @since bbPress (r4389)
     275 *
     276 * @internal Used internally to redirect bbPress to the about page on activation
     277 *
     278 * @uses is_network_admin() To bail if being network activated
     279 * @uses set_transient() To drop the activation transient for 30 seconds
     280 *
     281 * @return If network admin or bulk activation
     282 */
     283function bbp_add_activation_redirect() {
     284
     285    // Bail if activating from network, or bulk
     286    if ( is_network_admin() || isset( $_GET['activate-multi'] ) )
     287        return;
     288
     289    // Add the transient to redirect
     290    set_transient( '_bbp_activation_redirect', true, 30 );
     291}
Note: See TracChangeset for help on using the changeset viewer.