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

Not planned BB Code context not always needed

Snog

Well-known member
#1
To my knowledge, the context is not always needed for a BB Code, so I suggest this change...

Code:
public function fnBbCode($templater, &$escape, $bbCode, $context = null, $user = null, array $options = [], $type = 'html')
 

Kirby

Well-known member
#4
I still disagree.

There might be Add-ons dealing with BB code parsing that rely on information about what is being parsed in order to properly support your Code/Add-on, so you should not leave them in the dark - do provide the information what is being parsed.
 

Chris D

XenForo developer
Staff member
#5
It's a required argument in all cases so, indeed, it's not really designed to be optional. It should be provided even if it's just an arbitrary string that identifies its purpose or the add-on that calls it.
 

Snog

Well-known member
#6
It's a required argument in all cases so, indeed, it's not really designed to be optional. It should be provided even if it's just an arbitrary string that identifies its purpose or the add-on that calls it.
That's my point. An arbitrary string really doesn't do anything. But, I'll abide by it.

Heck, even though I don't see why it's needed, I'll take it all the way {{ bb_code($myarray.field, 'mytype', $xf.visitor) }}
 
Last edited: