jetpack_hulu_link

Convert Hulu links in comments into a Hulu shortcode.

Description

(string) jetpack_hulu_link( (string) $content ); 

Returns (string)

Parameters (1)

0. $content (string)
The content.

Usage

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

Defined (1)

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

/modules/shortcodes/hulu.php  
  1. function jetpack_hulu_link( $content ) { 
  2. $content = preg_replace_callback( '!^(http(s)?://)?(www\.)?hulu\.com\/watch\/([0-9]+)$!im', 'jetpack_hulu_link_callback', $content ); 
  3.  
  4. return $content;