• Can you make add _msc meta as an option in plugin settings? I wanna keep my database as much lighter as it can, my library contain bunch of custom uploads and store both jpeg/webp version. Other plugins (woocommerce, rankmath…) already add load of row, my current db reach million row of data too soon! Thanks for useful solution!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author erolsk8

    (@erolsk8)

    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.
    Thread Starter Hien Lai

    (@digizvn)

    Thank you! Already add this override to my must use php! 👍

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Perfectly & Simple!’ is closed to new replies.