shortcode_youtube

The Evolved shortcode youtube function.

Description

shortcode_youtube( $atts ); 

Parameters (1)

0. $atts
The atts.

Usage

  1. if ( !function_exists( 'shortcode_youtube' ) ) { 
  2. require_once '/functions.php'; 
  3.  
  4. // The atts. 
  5. $atts = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = shortcode_youtube($atts); 
  9.  

Defined (1)

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

/functions.php  
  1. function shortcode_youtube($atts) { 
  2. $atts = shortcode_atts( 
  3. array( 
  4. 'id' => '',  
  5. 'width' => 594,  
  6. 'height' => 334 
  7. ), $atts); 
  8.  
  9. return '<div class="video-embed"><iframe title="YouTube video player" width="' . $atts['width'] . '" height="' . $atts['height'] . '" src="http://www.youtube.com/embed/' . $atts['id'] . '" frameborder="0" allowfullscreen></iframe></div>';