Quantcast
Channel: WJunction - Webmaster Forum - QuickRDP.com- Upto 60% on rdp plans for ...
Viewing all articles
Browse latest Browse all 15793

Please help me to create this function

$
0
0
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.
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 Code:

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.

Viewing all articles
Browse latest Browse all 15793

Trending Articles