mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00: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:
parent
5195f9c299
commit
e179f25154
1 changed files with 17 additions and 0 deletions
|
@ -103,6 +103,8 @@ class bbcode_firstpass extends bbcode
|
||||||
*/
|
*/
|
||||||
function bbcode_init($allow_custom_bbcode = true)
|
function bbcode_init($allow_custom_bbcode = true)
|
||||||
{
|
{
|
||||||
|
global $phpbb_dispatcher;
|
||||||
|
|
||||||
static $rowset;
|
static $rowset;
|
||||||
|
|
||||||
// This array holds all bbcode data. BBCodes will be processed in this
|
// 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']))
|
'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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue