jetpack_hulu_link_callback

Callback to convert Hulu links in comments into a embed src.

Description

(string) jetpack_hulu_link_callback( (array) $matches ); 

Returns (string)

Parameters (1)

0. $matches (array)
The matches.

Usage

  1. if ( !function_exists( 'jetpack_hulu_link_callback' ) ) { 
  2. require_once '/modules/shortcodes/hulu.php'; 
  3.  
  4. // The matches. 
  5. $matches = array(); 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = jetpack_hulu_link_callback($matches); 
  9.  

Defined (1)

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

/modules/shortcodes/hulu.php  
  1. function jetpack_hulu_link_callback( $matches ) { 
  2. $video_id = $matches[4]; 
  3. $src = is_ssl() 
  4. ? 'https://secure.hulu.com' 
  5. : 'http://www.hulu.com'; 
  6.  
  7. // Make up an embed src to pass to the shortcode reversal function 
  8. $attrs['src'] = $src . '/embed.html?eid=' . esc_attr( $video_id ); 
  9.  
  10. return wpcom_shortcodereverse_huluhelper( $attrs );