jetpack_photon_banned_domains

The Jetpack by WordPress.com jetpack photon banned domains function.

Description

jetpack_photon_banned_domains( $skip, $image_url, $args, $scheme ); 

Parameters (4)

0. $skip
The skip.
1. $image_url
The image url.
2. $args
The args.
3. $scheme
The scheme.

Usage

  1. if ( !function_exists( 'jetpack_photon_banned_domains' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/functions.photon.php'; 
  3.  
  4. // The skip. 
  5. $skip = null; 
  6.  
  7. // The image url. 
  8. $image_url = null; 
  9.  
  10. // The args. 
  11. $args = null; 
  12.  
  13. // The scheme. 
  14. $scheme = null; 
  15.  
  16. // NOTICE! Understand what this does before running. 
  17. $result = jetpack_photon_banned_domains($skip, $image_url, $args, $scheme); 
  18.  

Defined (1)

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

/functions.photon.php  
  1. function jetpack_photon_banned_domains( $skip, $image_url, $args, $scheme ) { 
  2. $banned_domains = array( 
  3. 'http://chart.googleapis.com/',  
  4. 'https://chart.googleapis.com/',  
  5. 'http://chart.apis.google.com/',  
  6. ); 
  7.  
  8. foreach ( $banned_domains as $banned_domain ) { 
  9. if ( wp_startswith( $image_url, $banned_domain ) ) 
  10. return true; 
  11.  
  12. return $skip;