Created
December 28, 2019 17:03
-
-
Save MjHead/5499d6f0d651e08bf11be6a090f7480e to your computer and use it in GitHub Desktop.
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
<?php | |
add_action( 'import_post_meta', function( $post_id, $key, $value ) { | |
$slashit = array( '_form_data', '_notifications_data' ); | |
if ( in_array( $key, $slashit ) && '[]' !== $value ) { | |
delete_post_meta( $post_id, $key ); | |
update_post_meta( $post_id, $key, $value ); | |
} | |
}, 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment