1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-25 04:24:31 +02:00

[ticket/12060] Add event core.modify_bbcode_init

Use this event to modify the bbcode data for later parsing

PHPBB3-12060
This commit is contained in:
Matt Friedman
2013-12-04 16:45:02 -08:00
parent 5195f9c299
commit e179f25154

View File

@ -103,6 +103,8 @@ class bbcode_firstpass extends bbcode
*/
function bbcode_init($allow_custom_bbcode = true)
{
global $phpbb_dispatcher;
static $rowset;
// This array holds all bbcode data. BBCodes will be processed in this
@ -162,6 +164,21 @@ class bbcode_firstpass extends bbcode
'regexp' => array($row['first_pass_match'] => str_replace('$uid', $this->bbcode_uid, $row['first_pass_replace']))
);
}
$bbcodes = $this->bbcodes;
/**
* Use this event to modify the bbcode data for later parsing
*
* @event core.modify_bbcode_init
* @var array bbcodes The array of bbcode data for use in parsing
* @var array rowset The array of bbcode data from the database
* @since 3.1-A3
*/
$vars = array('bbcodes', 'rowset');
extract($phpbb_dispatcher->trigger_event('core.modify_bbcode_init', compact($vars)));
$this->bbcodes = $bbcodes;
}
/**