Changeset 1962386
- Timestamp:
- 10/24/2018 08:49:05 PM (7 years ago)
- File:
-
- 1 edited
-
somatic-framework/trunk/inc/somaFunctions.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
somatic-framework/trunk/inc/somaFunctions.php
r1962362 r1962386 1335 1335 // in case user didn't include http 1336 1336 if (!preg_match("~^(?:f|ht)tps?://~i", $url)) { 1337 $url = "//" . $url; 1338 } 1337 $url = "https://" . $url; 1338 } 1339 // enforce https if user provided http 1340 $url = str_replace('http://', 'https://', $url ); 1339 1341 1340 1342 // identify which site … … 1370 1372 ob_end_clean(); 1371 1373 1372 $media['url'] = " //www.youtube.com/watch?v=$id";// rebuild external url1374 $media['url'] = "https://www.youtube.com/watch?v=$id"; // rebuild external url 1373 1375 $media['id'] = $id; 1374 1376 $media['site'] = $site; 1375 $media['thumb'] = $meta['thumbnail_url']; // grabs url of medium 360x480 image1377 $media['thumb'] = $meta['thumbnail_url']; // grabs url of medium 360x480 image 1376 1378 $media['title'] = $meta['title']; 1377 1379 // $media['desc'] = stripslashes($meta['media$group']['media$description']['$t']); 1378 1380 // $media['duration'] = $meta['media$group']['media$content'][0]['duration']; 1379 $media['mobile'] = "youtube:$id"; // launches youtube app, i think...1381 $media['mobile'] = "youtube:$id"; // launches youtube app, i think... 1380 1382 $media['embed'] = "<iframe width=\"$width\" height=\"$height\" src=\"//www.youtube.com/embed/$id?rel=0&hd=1\" frameborder=\"0\" allowfullscreen></iframe>"; 1381 $media['iframe'] = "//www.youtube.com/embed/$id?rel=0&hd=1&autoplay=1"; // url to pass to iframe renderers1383 $media['iframe'] = "//www.youtube.com/embed/$id?rel=0&hd=1&autoplay=1"; // url to pass to iframe renderers 1382 1384 // $media['api'] = $meta; // we include everything we got from the site API, just in case (each site formats differently) 1383 1385 } else { … … 1400 1402 $meta = array_shift(unserialize($meta)); // get more metadata (note: we're making two distinct calls to API for vimeo) 1401 1403 $meta = array_merge($oembed, $meta); // combine the two (including some overlapping keys) 1402 $media['url'] = " //vimeo.com/$id"; // rebuild external url1404 $media['url'] = "https://vimeo.com/$id"; // rebuild external url 1403 1405 $media['id'] = $id; // store raw media ID 1404 1406 $media['site'] = $site; //
Note: See TracChangeset
for help on using the changeset viewer.