Skip to content

Instantly share code, notes, and snippets.

@ptasker
Last active September 29, 2016 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ptasker/23738b5648707dfc68c5cf10f96e2934 to your computer and use it in GitHub Desktop.
Save ptasker/23738b5648707dfc68c5cf10f96e2934 to your computer and use it in GitHub Desktop.
Jetpack option override
<?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