• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

How do I extend XenForo_Helper_String::bbCodeStrip() ?

mizter1nho

Well-known member
#2
for me needed create extended class for function bbCodeStrip becouse my addon use advanced bb codes and this function need update.
 

Kier

XenForo Developer
Staff member
#3
XenForo_Helper_String::bbCodeStrip() is called only by the {xen:helper, snippet, $text} template syntax function.

The functionality of this function can be overriden with a callback using the init_dependencies code event, with a static function like this:
PHP:
public static function addTemplateHelper()
{
	XenForo_Template_Helper_Core::$helperCallbacks['snippet'] = array('MyAddOn_MyClassName', 'bbCodeStrip');
}