Last active
August 23, 2016 08:02
-
-
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
This file contains hidden or 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
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