Skip to content

Instantly share code, notes, and snippets.

@tylershuster
Created February 3, 2015 19:44
Show Gist options
  • Save tylershuster/7a65fea8d27ebb12f2cb to your computer and use it in GitHub Desktop.
Save tylershuster/7a65fea8d27ebb12f2cb to your computer and use it in GitHub Desktop.
Images Directory Function for Bones Themes
<?
/**
* Retrieve images directory URI. Bones Extension
*
* @return string
*/
function get_images_directory_uri() {
$stylesheet = get_stylesheet();
$theme_root = get_theme_root( $stylesheet );
$stylesheet_dir = "$theme_root/$stylesheet/library/images";
/**
* Filter the stylesheet directory URI.
*
* @since 1.5.0
*
* @param string $stylesheet_dir_uri Stylesheet directory URI.
* @param string $stylesheet Name of the activated theme's directory.
* @param string $theme_root_uri Themes root URI.
*/
return apply_filters( 'stylesheet_directory_uri', $stylesheet_dir_uri, $stylesheet, $theme_root_uri );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment