Skip to content

Instantly share code, notes, and snippets.

@UmeshSingla
Last active August 23, 2016 08:02
Show Gist options
  • Save UmeshSingla/c0782e128a964b7026cf to your computer and use it in GitHub Desktop.
Save UmeshSingla/c0782e128a964b7026cf to your computer and use it in GitHub Desktop.
WP Smush: Allows you to skip WP Smush Meta while exporting WordPress content
add_filter( 'wxr_export_skip_postmeta', 'skip_smush_meta', '', 2 );
/**
* Skip WP Smush meta while exporting
*
* @param $skip, Whether to skip meta key or not
* @param $meta_key, Current meta_key
*
* @return bool
*/
function skip_smush_meta( $skip, $meta_key ) {
if( 'wp-smpro-smush-data' == $meta_key ) {
return true;
}
return $skip;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment