Skip to content

Instantly share code, notes, and snippets.

@mgibbs189 mgibbs189/functions.php
Last active Apr 30, 2018

Embed
What would you like to do?
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

This comment has been minimized.

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
You can’t perform that action at this time.