Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am using a geo-tag map plugin called Geo Mashup, along with a WordPress Multisite install.

When I create a new site, an alert appears (in the admin alerts area) immediately telling me I have to go to the settings page to update the database:

"Geo Mashup needs to upgrade its database, visit the settings to do it now."
And simply visiting this page (Settings > Geo Mashup) on the new 'sub site' makes it work.

Is it possible to redirect the browser to the new site plugin's setting page right after creating the new site?

share|improve this question
    
Hi, did you ever figure out a good way to do this? If so, it would be great to post your answer here. –  Matthew Boynes Feb 13 '12 at 7:18

1 Answer 1

The following code does the redirect. In this example, the redirection is to a BackupBuddy's page.

add_filter('admin_head-site-new.php','wpse_35760_redirect_after_site_creation');

function wpse_35760_redirect_after_site_creation()
{
    if( !isset($_GET['update']) || 'added' != $_GET['update'] )
        return;

    switch_to_blog($_GET['id']);
    wp_redirect( admin_url( 'admin.php?page=pb_backupbuddy_multisite_export' ) ); 
    exit;
}

For reference: Related Answer that uses an Action Hook fired on blog creation.
But, for the case in this Question -redirect after creation-, I think the approach used here may be better.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.