youtube_link_callback

Callback function for the regex that replaces YouTube URLs with YouTube embeds.

Description

youtube_link_callback( $matches ); 

Parameters (1)

0. $matches
The matches.

Usage

  1. if ( !function_exists( 'youtube_link_callback' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/modules/shortcodes/youtube.php'; 
  3.  
  4. // The matches. 
  5. $matches = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = youtube_link_callback($matches); 
  9.  

Defined (1)

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

/modules/shortcodes/youtube.php  
  1. function youtube_link_callback( $matches ) { 
  2. return "\n" . youtube_id( $matches[0] ) . "\n";