-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid confusion between source sets and image sources.
- Loading branch information
Showing
5 changed files
with
60 additions
and
57 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
/** | ||
* Image source functionality. | ||
* | ||
* @package Respect_Art_Direction | ||
*/ | ||
|
||
/** | ||
* Register a new image source. | ||
* | ||
* @param string $source_set_name Name of an image source. | ||
* @param array $image_sizes List of image sizes for the sourcesource. | ||
*/ | ||
function rad_add_image_source( $source_set_name, $image_sizes = array() ) { | ||
global $image_sources; | ||
|
||
$image_sources[ $source_set_name ] = $image_sizes; | ||
} | ||
|
||
/** | ||
* Checks if an image size is a registered image source. | ||
* | ||
* @param string $image_size Image size name to check. | ||
* | ||
* @return bool Whether the image size is a source. | ||
*/ | ||
function rad_image_size_is_image_source( $image_size ) { | ||
global $image_sources; | ||
|
||
return isset( $image_sources[ $image_size ] ); | ||
} |
This file was deleted.
Oops, something went wrong.
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