Skip to content

Instantly share code, notes, and snippets.

@robincornett
Last active March 8, 2018 18:35
Show Gist options
  • Save robincornett/3a9bdabe957bdee639043b6a93bf95ea to your computer and use it in GitHub Desktop.
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.
<?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;
}
<?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