Last active
September 29, 2016 16:31
-
-
Save ptasker/23738b5648707dfc68c5cf10f96e2934 to your computer and use it in GitHub Desktop.
Jetpack option override
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
<?php | |
/** | |
* | |
* Filter to not migrate the 'jetpack_options' value | |
* | |
* @param $options | |
* | |
* @return array | |
* | |
* From the tweaks plugin: | |
* | |
* By default, 'wpmdb_settings' and 'wpmdb_error_log' are preserved when the database is overwritten in a migration. | |
* This filter allows you to define additional options (from wp_options) to preserve during a migration. | |
* The example below preserves the 'blogname' value though any number of additional options may be added. | |
*/ | |
function wpmdb_jetpack_preserved_options( $options ) { | |
$options[] = 'jetpack_options'; | |
return $options; | |
} | |
add_filter( 'wpmdb_preserved_options', 'wpmdb_jetpack_preserved_options' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment