Last active
March 8, 2018 18:35
-
-
Save robincornett/3a9bdabe957bdee639043b6a93bf95ea to your computer and use it in GitHub Desktop.
Tell SuperSide Me (2.4.0) to use your theme's SVG icons.
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 | |
add_filter( 'supersideme_svg', 'leaven_prefer_theme_svg' ); | |
/** | |
* Tell SuperSide Me not to load any icons. | |
* @param $args | |
* | |
* @return mixed | |
*/ | |
function leaven_prefer_theme_svg( $args ) { | |
$args['styles'] = false; | |
return $args; | |
} |
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 | |
add_filter( 'supersideme_svg', 'leaven_prefer_theme_svg' ); | |
/** | |
* Let's load completely custom icons which aren't somehow otherwise being loaded. | |
* @param $args | |
* | |
* @return mixed | |
*/ | |
function leaven_prefer_theme_svg( $args ) { | |
$args['styles'] = array( 'custom' ); | |
$args['path'] = get_stylesheet_directory() . '/sprites'; | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment