jetpack_kickstarter_shortcode

Parse shortcode arguments and render its output.

Description

(string) jetpack_kickstarter_shortcode( (array) $atts ); 

Returns (string)

Parameters (1)

0. $atts (array)
Shortcode parameters.

Usage

  1. if ( !function_exists( 'jetpack_kickstarter_shortcode' ) ) { 
  2. require_once '/modules/shortcodes/kickstarter.php'; 
  3.  
  4. // Shortcode parameters. 
  5. $atts = array(); 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = jetpack_kickstarter_shortcode($atts); 
  9.  

Defined (1)

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

/modules/shortcodes/kickstarter.php  
  1. function jetpack_kickstarter_shortcode( $atts ) { 
  2. if ( empty( $atts['url'] ) ) { 
  3. return ''; 
  4.  
  5. $url = esc_url_raw( $atts['url'] ); 
  6. if ( ! preg_match( '#^(www\.)?kickstarter\.com$#i', parse_url( $url, PHP_URL_HOST ) ) ) { 
  7. return '<!-- Invalid Kickstarter URL -->'; 
  8.  
  9. global $wp_embed; 
  10. return $wp_embed->shortcode( $atts, $url );