• Resolved vincentjflorio

    (@vincentjflorio)


    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.

Viewing 1 replies (of 1 total)
  • Plugin Author ikanaweb

    (@ikanaweb)

    Hi @vincentjflorio,

    Thank you for your post, I really appreciate it.

    You are right, the plugin is hooked to ‘the_content’ filter action, and is only triggered when apply_filters() is called.

    I was thinking about adding a FAQ section, and I will have to write something about ‘the_content’ filter action for sure.

    I hope you enjoy my plugin ??
    There are more features coming soon !

    Best regards

Viewing 1 replies (of 1 total)
  • The topic ‘A heads up to those looking to use this in PHP’ is closed to new replies.