-
Improvement
-
Resolution: Fixed
-
Minor
-
3.1.3, 3.2.0-dev
-
None
Currently extensions can custom bbcode data to bbcodes array in the function bbcode_init() in includes/message_parser.php using core.modify_bbcode_init event.
But they can't use their own validation methods like the core does:
'code' => array('bbcode_id' => 8, 'regexp' => array('#\[code(?:=([a-z]+))?\](.+\[/code\])#uise' => "\$this->bbcode_code('\$1', '\$2')")),
|
The idea is to declare $phpbb_container as a global in the function parse_bbcode() to allow extensions adding custom validation methods for bbcodes, f.e.
'code' => array('bbcode_id' => 8, 'regexp' => array('#\[code(?:=([a-z]+))?\](.+\[/code\])#uise' => "\$phpbb_container->get('vendor.extension.class')->custom_bbcode_validator('\$1', '\$2')")),
|
Also the same possibility would be logical to add to the bbcode second pass procedure (includes/bbcode.php).
- was obsoleted by solution of
-
PHPBB-11768 Integrate s9e\TextFormatter
- Unverified Fix