soundcloud_oembed_params_callback

Parameterize url.

Description

({string}) soundcloud_oembed_params_callback( ({array}) $match ); 

Returns ({string})

Parameterized url

Parameters (1)

0. $match ({array})
Matched regex

Usage

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

Defined (1)

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

/modules/shortcodes/soundcloud.php  
  1. function soundcloud_oembed_params_callback( $match ) { 
  2. global $soundcloud_oembed_params; 
  3.  
  4. // Convert URL to array 
  5. $url = parse_url( urldecode( $match[1] ) ); 
  6. // Convert URL query to array 
  7. parse_str( $url['query'], $query_array ); 
  8. // Build new query string 
  9. $query = http_build_query( array_merge( $query_array, $soundcloud_oembed_params ) ); 
  10.  
  11. return 'src="' . $url['scheme'] . '://' . $url['host'] . $url['path'] . '?' . $query;