Skip to content

Instantly share code, notes, and snippets.

@mgibbs189
Last active April 30, 2018 06:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgibbs189/b0c7d1d6f304985b96c464ef461259f5 to your computer and use it in GitHub Desktop.
Save mgibbs189/b0c7d1d6f304985b96c464ef461259f5 to your computer and use it in GitHub Desktop.
Override the expand / collapse icons
<?php
add_filter( 'facetwp_assets', function( $assets ) {
FWP()->display->json['expand'] = '<span>expand</span>';
FWP()->display->json['collapse'] = '<span>collapse</span>';
// Return the same thing (since we're hijacking this hook)
return $assets;
});
@de-b
Copy link

de-b commented Apr 30, 2018

Hi
when I used this filter, it prints the whole thing like "< span >expand< /span >", is there anyway we can skip this?

Thank you

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