WebDevStudios / Automatic-Featured-Images-from-Videos

If a YouTube or Vimeo video exists in the first few paragraphs of a post, automatically set the post's featured image to that vidoe's thumbnail.
33 stars 24 forks source link

how to ignore if there is already a feature image set? #16

Closed eSuit closed 8 years ago

eSuit commented 8 years ago

hi, currently the plugin (which is great!) over rides any feature image that has been set to a post with videos embedded in it. how to not auto set video thumbnails as featured image if theres already a featured image that was set?

tw2113 commented 8 years ago

hi @eSuit. Thanks for bringing this to our attention. I've tested some things out, and it looks like the plugin was failing for cases of revisions, and because of that, it was still wiping out meta values somehow.

I have pushed up a commit that returns early in those cases, you can check it out at 0f69e58 and apply it yourself if you want. Only 3 lines or so.

Will be part of 1.0.4, but not quite sure when I'll intend to release that to wordpress.org.

Please try it out and let me know if this solves it on your end, or if I need to investigate some more. It's worked with what testing I did this morning.