Hello,
I'm trying to create a custom field in WordPress to add Vine.co videos.
I found the guide which demonstrate how to add a custom meta box for YouTube videos only.
Can anyone help me to change that metabox from YouTube Videos to Vine.co Videos?
This is the function for Vine.co Videos
Another function I want to merge is to get the vine featured image and set it automatically in WordPress using the guide below?
https://halgatewood.com/php-get-vine...deo-thumbnail/
If anyone can help it will be greatly appreciated. Thanks in advance.
I'm trying to create a custom field in WordPress to add Vine.co videos.
I found the guide which demonstrate how to add a custom meta box for YouTube videos only.
Code:
http://www.iamclarence.com/blog/2012/02/23/wordpress-101-adding-a-youtube-meta-box-to-pagepost-editing/
Can anyone help me to change that metabox from YouTube Videos to Vine.co Videos?
This is the function for Vine.co Videos
PHP:
function vine($id) { // gets the raw .mp4 url from the vine id
$vine = file_get_contents("http://vine.co/v/{$id}");
preg_match('/property="twitter:player:stream" content="(.*?)"/', $vine, $matches);
return ($matches[1]) ? $matches[1] : false;
}
Another function I want to merge is to get the vine featured image and set it automatically in WordPress using the guide below?
https://halgatewood.com/php-get-vine...deo-thumbnail/
If anyone can help it will be greatly appreciated. Thanks in advance.