4

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?

1
  • Hi, did you ever figure out a good way to do this? If so, it would be great to post your answer here. Commented Feb 13, 2012 at 7:18

1 Answer 1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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