Created
May 16, 2015 17:02
-
-
Save advancedwpuser/510cd3dd53943938ccf2 to your computer and use it in GitHub Desktop.
Dynamically Enable/Disable Search Engines when using MigrateDB Pro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Migrating your DB with Migrate DB Pro | |
* your "Disable Search Engines" setting | |
* can get pushed to your live site | |
* This is how you can automate that | |
* Ref: https://deliciousbrains.com/tweaking-wp-migrate-db-pro-actions-filters/ | |
* AWP Link: https://www.facebook.com/groups/advancedwp/permalink/951660888229459/ | |
* Care of Chris Perryman www.revelationconcept.com | |
*/ | |
add_filter('wpmdb_preserved_options', function($preserved_options) { | |
$preserved_options = array_merge($preserved_options, array('blog_public')); // don't tell Google it can index test site! | |
return array_unique($preserved_options); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment