mixcloud

The Jetpack by WordPress.com mixcloud shortcode.


Usage

  1. // basic usage 
  2. echo do_shortcode('[mixcloud]'); 
  1. // variable usage 
  2. $result = do_shortcode('[mixcloud]'); 
  3. echo $result;  

Defined (1)

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

/modules/shortcodes/mixcloud.php  
  1. // Register oEmbed provider 
  2. // Example URL: http://www.mixcloud.com/oembed/?url=http://www.mixcloud.com/MalibuRum/play-6-kissy-sellouts-winter-sun-house-party-mix/ 
  3. wp_oembed_add_provider('#https?://(?:www\.)?mixcloud\.com/\S*#i', 'http://www.mixcloud.com/oembed', true); 
  4.  
  5. // Register mixcloud shortcode 
  6. add_shortcode( 'mixcloud', 'mixcloud_shortcode' ); 
  7. function mixcloud_shortcode( $atts, $content = null ) { 
  8.  
  9. if ( empty( $atts[0] ) && empty( $content ) ) 
  10. return "<!-- mixclouderror invalid mixcloud resource -->"; 
  11.