Hey @digizvn, this can already be done by adding this filter function (e.g. somewhere in your theme):
/**
* Overwrite Media Sync plugin custom metadata ("_msc" record in <code>wp_postmeta</code> table).
*
* Basically a $meta_value parameter of add_post_meta function:
* https://developer.wordpress.org/reference/functions/add_post_meta/
*
* @param mixed $media_sync_metadata Default metadata to be saved
* @param int $attach_id Each scanned file/folder name
* @param string $absolute_path Absolute path of file being imported
* @return mixed Returning false will skip saving this metadata.
*/
function my_custom_media_sync_metadata($media_sync_metadata, $attach_id, $absolute_path)
{
return false;
}
add_filter('media_sync_filter_before_update_msc_metadata', 'my_custom_media_sync_metadata', 10, 3);
If you’ve never done that, just let me know, I can find out some tutorial or something.
Thanks for the review! 🙂
-
This reply was modified 1 year, 11 months ago by erolsk8.
Thank you! Already add this override to my must use php! 👍