videopress_cdn_file_url

Return an absolute URI for a given filename and guid on the CDN.

Description

(string) videopress_cdn_file_url( (string) $guid, (string) $filename ); 

No check is performed to ensure the guid exists or the file is present. Simple centralized string builder.

Returns (string)

Absolute URL of VideoPress file for the given guid.

Parameters (2)

0. $guid (string)
VideoPress identifier
1. $filename (string)
Name of file associated with the guid (video file name or thumbnail file name)

Usage

  1. if ( !function_exists( 'videopress_cdn_file_url' ) ) { 
  2. require_once '/modules/videopress/utility-functions.php'; 
  3.  
  4. // VideoPress identifier 
  5. $guid = ''; 
  6.  
  7. // name of file associated with the guid (video file name or thumbnail file name) 
  8. $filename = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = videopress_cdn_file_url($guid, $filename); 
  12.  

Defined (1)

The function is defined in the following location(s).

/modules/videopress/utility-functions.php  
  1. function videopress_cdn_file_url( $guid, $filename ) { 
  2. return "https://videos.files.wordpress.com/{$guid}/{$filename}";