Hello,
i just tried something and saw, that my custom-field is
“_featured_video” and is an array.
The videourl is stored in
“_featured_video[the_post_video]”, but when i put it in in settings of the plugin, it doesn’t work.
With “echo _featured_video[the_post_video]” it puts out the right video.
Update:
With a new created custom-field it only works for
youtube.com/… links, not for [youtube id=””] shortcodes.
Why does video shortcodes not work? In debug-menu it finds a thumbnail?
How to work with the custom-field array?
Update:
I fixed the Problem with the custom-field array in following way:
In Line 278 of video-thumbnails.php:
$temp = get_post_meta( $post_id, $this->settings->options['custom_field'], true );
$markup = end($temp);
Now the plugin reads my custom-field Array.
But the Plugin is now only working with clear-links (http://youtube…) not with my shortcode like [youtube id=”xxx”] or other providers
Could someone write a filter-code for the shortcode Version in the provider-classes? Maybe the filter could cut the string unto the id and put the id in another variable. I’ve got about 400 posts with shortcode videos.
My php is not enough for this shortcode-filter.
$temp2 = str_replace('[youtube id="','https://www.youtube.com/watch?v=',$temp);
$temp2 = str_replace('[vimeo id="','https://vimeo.com/',$temp2);
$temp2 = str_replace('[dailymotion id="','http://www.dailymotion.com/embed/video/',$temp2);
$temp2 = str_replace('[vine id="','https://vine.co/v/',$temp2);
$temp2 = str_replace('[metacafe id="','http://www.metacafe.com/embed/',$temp2);
$temp2 = str_replace('[ted id="','https://www.ted.com/talks/',$temp2);
$temp2 = str_replace('[iframe id="https://embed-ssl.ted.com/talks/','https://www.ted.com/talks/',$temp2);
$temp2 = str_replace('[collegehumor id=','http://www.collegehumor.com/video/6851812/',$temp2);
$temp2 = str_replace('[funnyordie id="','http://www.funnyordie.com/videos/',$temp2);
$temp2 = str_replace('"',' ',$temp2);
$temp2 = str_replace('"]',' ',$temp2);
$markup = end($temp2);
I just played around and it works by converting the shortcode into usual links.