Skip to content

Instantly share code, notes, and snippets.

@cdils
Last active December 13, 2018 16:01
Show Gist options
  • Save cdils/7fc941c0355e8d06b023b703a01506e0 to your computer and use it in GitHub Desktop.
Save cdils/7fc941c0355e8d06b023b703a01506e0 to your computer and use it in GitHub Desktop.
<?php //remove this line
add_filter( 'simple_social_default_profiles', 'biw_add_new_simple_icon' );
/**
* Add Houzz icon to Simple Social Icons plugin.
*
* @param array $icons Social icons to include in widget options.
*
* @return array Updated icon set.
*/
function biw_add_new_simple_icon( $icons ) {
$icons['houzz'] = [
'label' => __( 'Houzz', 'simple-social-icons' ),
'pattern' => '<li class="social-houzz"><a href="%s" %s><svg role="img" class="social-houzz-svg" aria-labelledby="social-houzz"><title id="social-houzz">' . __( 'Houzz icon', 'simple-social-icons' ) . '</title><use xlink:href="' . esc_url( get_stylesheet_directory_uri(__FILE__) . '/images/houzz.svg#social-houzz' ) . '"></use></svg></a></li>',
];
return $icons;
}
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<svg id="social-houzz" viewBox="0 0 54 60" xmlns="http://www.w3.org/2000/svg">
<path d="M-20-20h94V80h-94z" fill="none"/>
<path d="M34 60h20V25.5L14 14V0H0v60h20V40h14z"/>
</svg>
@c12281
Copy link

c12281 commented Dec 13, 2018

I copy and pasted the code above to the functions.php file and got the following error message:

Your PHP code changes were rolled back due to an error on line 225 of file wp-content/themes/gallery-pro/functions.php. Please fix and try saving again.

syntax error, unexpected '<', expecting end of file_

Here's the code that's on line 225:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment