wpcom_vimeo_embed_url

Callback to modify output of embedded Vimeo video using Jetpack's shortcode.

Description

(string) wpcom_vimeo_embed_url( (array) $matches, (array) $attr, (array) $url ); 

Returns (string)

Return output of Vimeo shortcode with the proper markup.

Parameters (3)

0. $matches (array)
Regex partial matches against the URL passed.
1. $attr (array)
Attributes received in embed response
2. $url (array)
Requested URL to be embedded

Usage

  1. if ( !function_exists( 'wpcom_vimeo_embed_url' ) ) { 
  2. require_once '/modules/shortcodes/vimeo.php'; 
  3.  
  4. // Regex partial matches against the URL passed. 
  5. $matches = array(); 
  6.  
  7. // Attributes received in embed response 
  8. $attr = array(); 
  9.  
  10. // Requested URL to be embedded 
  11. $url = array(); 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = wpcom_vimeo_embed_url($matches, $attr, $url); 
  15.  

Defined (1)

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

/modules/shortcodes/vimeo.php  
  1. function wpcom_vimeo_embed_url( $matches, $attr, $url ) { 
  2. return vimeo_shortcode( array( $url ) );