vine_shortcode

The Jetpack by WordPress.com vine shortcode function.

Description

vine_shortcode( $atts ); 

Parameters (1)

0. $atts
The atts.

Usage

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

Defined (1)

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

/modules/shortcodes/vine.php  
  1. function vine_shortcode( $atts ) { 
  2. global $wp_embed; 
  3.  
  4. if ( empty( $atts['url'] ) ) 
  5. return ''; 
  6.  
  7. if ( ! preg_match( '#https?://vine.co/v/([a-z0-9]+).*#i', $atts['url'] ) ) 
  8. return ''; 
  9.  
  10. return $wp_embed->shortcode( $atts, $atts['url'] );