-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
45 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
/** | ||
* Prevent Photon from filtering srcset. | ||
* This is done using a method to prevent conflicting with other usage of this filter. | ||
* | ||
* @param $valid | ||
* @param $url | ||
* @param $parsed_url | ||
* | ||
* @return false | ||
*/ | ||
function siteorigin_panels_photon_exclude_parallax_srcset( $valid, $url, $parsed_url ) { | ||
return false; | ||
} | ||
|
||
/** | ||
* Prevent Photon from overriding parallax images when it calculates srcset and filters the_content. | ||
* | ||
* @param $skip Whether to exclude the iamge from Photon. | ||
* @param $src The URL of the current image | ||
* @param $tag This parameter is unrelaible as it can contain the image tag, or an array containing image values. | ||
* | ||
* @return bool | ||
*/ | ||
function siteorigin_panels_photon_exclude_parallax( $skip, $src, $tag ) { | ||
if ( ! is_array( $tag ) && strpos( $tag, 'data-siteorigin-parallax' ) !== false ) { | ||
$skip = true; | ||
} | ||
return $skip; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters