Created
June 10, 2018 15:13
-
-
Save ideadude/9570537104fa6986959026e60a70f4a6 to your computer and use it in GitHub Desktop.
Sample get_image wrapper for localizing non-string assets. (BWAWWP Blog)
This file contains hidden or 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
<?php | |
// Gets the full URL for an image given the image filename. | |
function schoolpress_get_image( $image ) { | |
$dir = apply_filters( | |
'schoolpress_images_url', | |
SCHOOLPRESS_URL . '/images/' | |
); | |
return $dir . $image; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment