jetpack_shortcode_get_vimeo_id

[vimeo 141358] [vimeo http://vimeo.com/141358] [vimeo 141358 h=500&w=350] [vimeo id=141358 width=350 height=500].

Description

jetpack_shortcode_get_vimeo_id( $atts ); 

Eskmo We Got More (Official Video) from Ninja Tune on Vimeo.

Parameters (1)

0. $atts
The atts.

Usage

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

Defined (1)

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

/modules/shortcodes/vimeo.php  
  1. function jetpack_shortcode_get_vimeo_id( $atts ) { 
  2. if ( isset( $atts[0] ) ) { 
  3. $atts[0] = trim( $atts[0] , '=' ); 
  4. $id = false; 
  5. if ( is_numeric( $atts[0] ) ) 
  6. $id = (int) $atts[0]; 
  7. elseif ( preg_match( '|vimeo\.com/(\d+)/?$|i', $atts[0], $match ) ) 
  8. $id = (int) $match[1]; 
  9. elseif ( preg_match( '|player\.vimeo\.com/video/(\d+)/?$|i', $atts[0], $match ) ) 
  10. $id = (int) $match[1]; 
  11. return $id; 
  12. return 0;