Tried with default theme:
Tried with all other plugins disabled:
Page showing the issue: http://youth4planet.loc/videos/
This actually isn’t about a bug but more of a development question.
I want to use ARVE Pro to ONLY load thumbnails for the videos via PHP to build a plugin on top of it for my client. I looked in the code but I can’t really figure it out, so I figured I might just ask you.
Currently I am doing something like this:
$shortcode = ‘[arve maxwidth=”300″ play_icon_style=”none” mode=”lazyload” url=”‘.$video_url.'” hide_title=”yes” title=”‘.$post_title.'”‘;
$shortcode .= ” /]”;
$shortcode = apply_filters( “the_content”, $shortcode );
In CSS I am hiding the load-button and wrap my custom anchor around it.
It’s working but far from elegant.
Is there a way to for example do something like this using ARVE Pro?
$thumbnail_url = arve_get_thumbnail(“http://youtube.com/546572427”, $maxwidth = 300);
You could filter the output with a regular expression or XPath https://stackoverflow.com/questions/1179641/xpath-to-parse-src-from-img-tag and filter out the image tag or the src attribute of it to get the thumbnail only. There is not really a function to get it directly like that at this point.
Also you can use the do_shortcode( $shortcode ) function instead of running all the_content filters if you are just looking for the ARVE output.