blip_shortcode

The Jetpack by WordPress.com blip shortcode function.

Description

blip_shortcode( $atts ); 

Parameters (1)

0. $atts
The atts.

Usage

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

Defined (1)

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

/modules/shortcodes/blip.php  
  1. function blip_shortcode( $atts ) { 
  2. if ( ! isset( $atts[0] ) ) 
  3. return ''; 
  4. $src = $atts[0]; 
  5.  
  6. if ( preg_match( '/^\?posts_id=(\d+)&[^d]*dest=(-?\d+)$/', $src, $matches ) ) 
  7. return "<script type='text/javascript' src='http://blip.tv/syndication/write_player?skin=js&posts_id={$matches[1]}&cross_post_destination={$matches[2]}&view=full_js'></script>"; 
  8. elseif ( preg_match( '|^http://blip.tv/play/[.\w]+$|', urldecode( $src ) ) ) // WLS 
  9. return "<embed src='$src' type='application/x-shockwave-flash' width='480' height='300' allowscriptaccess='never' allowfullscreen='true'></embed>"; 
  10.  
  11.  
  12. return "<!--blip.tv pattern not matched -->";