Skip to:
Content

BuddyPress.org

Changeset 6728


Ignore:
Timestamp:
01/19/2013 03:25:55 AM (13 years ago)
Author:
boonebgorges
Message:

Add a is_new_install $_GET parameter when redirecting to About on fresh install

When building the About/What's New Dashboard panel, it's helpful to know
whether this is a new BuddyPress install, or an upgrade from a previous
version.

See #4727

Location:
trunk/bp-core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/admin/bp-core-functions.php

    r6695 r6728  
    319319        return;
    320320
     321    $query_args = array( 'page' => 'bp-about' );
     322    if ( get_transient( '_bp_is_new_install' ) ) {
     323        $query_args['is_new_install'] = '1';
     324        delete_transient( '_bp_is_new_install' );
     325    }
     326
    321327    // Redirect to BuddyPress about page
    322     wp_safe_redirect( add_query_arg( array( 'page' => 'bp-about' ), bp_get_admin_url( 'index.php' ) ) );
     328    wp_safe_redirect( add_query_arg( $query_args, bp_get_admin_url( 'index.php' ) ) );
    323329}
    324330
  • trunk/bp-core/bp-core-update.php

    r6693 r6728  
    321321        return;
    322322
     323    // Record that this is a new installation, so we show the right
     324    // welcome message
     325    if ( bp_is_install() ) {
     326        set_transient( '_bp_is_new_install', true, 30 );
     327    }
     328
    323329    // Add the transient to redirect
    324     set_transient( '_bp_activation_redirect', true, 30 );
     330    set_transient( '_bp_activation_redirect', true, 30 );
    325331}
    326332
Note: See TracChangeset for help on using the changeset viewer.