A heads up to those looking to use this in PHP
-
This might be obvious to some, but not to others. I was using Carbon Fields to store URLs for videos, and of course when I called them up in PHP, they’d just be text. So I used wp_oembed_get, and yep, it created the proper HTML to embed the video.
But because the addresses are post meta, it didn’t figure into the content, which (if I’m not mistaken) is all that gets parsed (and for good reason) when this plug-in runs in to do its business (which it does perfectly!)
So, instead of just echoing out that address, or even the function, I ran it through the content filter:
echo apply_filters( 'the_content', YOUR_VARIABLE_HERE );
and it treats it like it would, as normal page content, and applies the thumbnails just as perfectly.
- The topic ‘A heads up to those looking to use this in PHP’ is closed to new replies.