Support Forum

change [spoiler] to [spoil]

GS Golden Sharks
Golden Sharks
Member

 Hello!
I need help – I want to change original [spo.iler] function to work with [spoil] code too (because our external software that our users effects will post on forum are in [spoil] tags)

Yours,
Golden Sharks Team

3 Answers

New Answer

MP Mr Papa
Mr Papa
Member

as long as you dont care about the button in tinymce, you can just add a new definition for the shortcode…  so in your spFunctions.php file of your sp theme, add

add_shortcode('spoil', 'sp_filter_display_spoiler');

as always, we strongly recommend you use a child theme or a custom theme before making the theme changes to keep from losing changes on updates…

GS Golden Sharks
Golden Sharks
Member

I added this line to spFunctions of sp theme I’m using but the content of [spoil] doesn’t appear at all.

MP Mr Papa
Mr Papa
Member

It does for me…  are you filtering shortcodes on forum – options – content settings?  if so,  you will need to add it to the allowed list…