• Resolved samurai

    (@samurai)


    Hello Kyle and thanks for a great plugin πŸ™‚

    May I request a filter to be added to kgvid_replace_video() just before the “return” statement.

    Your code (for a documented reason) does not use wp_update_post() and instead calls $wpdb->update directly which breaks another plugin that I use.
    To resolve this I need to call clean_post_cache() just before the function returns and I’d really prefer not modifying your code.

    Thanks for your help.

    https://ww.wp.xz.cn/plugins/video-embed-thumbnail-generator/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Kyle Gilman

    (@kylegilman)

    Thanks for bringing this to my attention. I feel like I should really make it work for everyone, not just people who know how to access filters. Can you give me more details about the other plugin and the conflict that calling $wpdb->update to change the GUID creates? There might be a simple solution that works with an existing hook.

    Plugin Author Kyle Gilman

    (@kylegilman)

    Ok, here’s an idea: I’ll run wp_update_post to update the MIME type first, then only update the GUID with $wpdb->update. I assume it’s the MIME you’re having trouble with and you’re not doing anything with GUIDs?

    Plugin Author Kyle Gilman

    (@kylegilman)

    I’ll also add clean_post_cache() to the kgvid_replace_video function.

    Plugin Author Kyle Gilman

    (@kylegilman)

    Looks like I don’t need to call clean_post_cache() since wp_update_post() does it for me. I created an issue on GitHub to track this change. It will be in the next release which I’m hoping to put out in about a week. If you want you can try out the development version on GitHub. It’s pretty stable.

    Thread Starter samurai

    (@samurai)

    Hi Kyle – yes, if you call wp_update_post() there’s no need for a hook nor clean_post_cache().

    Thanks for your prompt reply πŸ™‚

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘kgvid_replace_video: filter request’ is closed to new replies.