Skip to content

Commit

Permalink
Photon: update filter docblock to match possible types (#36731)
Browse files Browse the repository at this point in the history
If you browse through that file, you will see that we can pass a string, an array, or even null to jetpack_photon_skip_image
  • Loading branch information
jeherve authored and TimBroddin committed Apr 10, 2024
1 parent 58ec863 commit 98fa50d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Update filter docblock to match possible types.
2 changes: 1 addition & 1 deletion projects/packages/image-cdn/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@automattic/jetpack-image-cdn",
"version": "0.3.3",
"version": "0.3.4-alpha",
"description": "Serve images through Jetpack's powerful CDN",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/image-cdn/#readme",
"bugs": {
Expand Down
8 changes: 4 additions & 4 deletions projects/packages/image-cdn/src/class-image-cdn.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
final class Image_CDN {

const PACKAGE_VERSION = '0.3.3';
const PACKAGE_VERSION = '0.3.4-alpha';

/**
* Singleton.
Expand Down Expand Up @@ -368,9 +368,9 @@ public static function filter_the_content( $content ) {
*
* @since 2.0.3
*
* @param bool false Should Photon ignore this image. Default to false.
* @param string $src Image URL.
* @param string $tag Image Tag (Image HTML output).
* @param bool false Should Photon ignore this image. Default to false.
* @param string $src Image URL.
* @param string|array|null $tag Image Tag (Image HTML output) or array of image details for srcset.
*/
if ( apply_filters( 'jetpack_photon_skip_image', false, $src, $tag ) ) {
continue;
Expand Down

0 comments on commit 98fa50d

Please sign in to comment.