jetpack_photon_any_extension_for_domain

Allow Photon to use query strings as well.

Description

apply_filters( 'jetpack_photon_any_extension_for_domain', (bool) $false, (string) $image_url_parts_host ); 

By default, Photon doesn't support query strings so we ignore them and look only at the path. This setting is Photon Server dependent.

Parameters (2)

0. $false (bool)
False Should images using query strings go through Photon. Default is false.
1. $image_url_parts_host (string)
The image url parts host.

Usage

To run the hook, copy the example below.
  1. $false = apply_filters( 'jetpack_photon_any_extension_for_domain', $false, $image_url_parts_host ); 
  2.  
  3. if ( !empty( $false ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the jetpack_photon_any_extension_for_domain callback 
  2. function filter_jetpack_photon_any_extension_for_domain( $false, $image_url_parts_host ) { 
  3. // make filter magic happen here... 
  4. return $false
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'jetpack_photon_any_extension_for_domain', 'filter_jetpack_photon_any_extension_for_domain', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'jetpack_photon_any_extension_for_domain', 'filter_jetpack_photon_any_extension_for_domain', 10, 2 ); 

Defined (1)

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

/functions.photon.php  
  1. if ( ! apply_filters( 'jetpack_photon_any_extension_for_domain', false, $image_url_parts['host'] ) ) {