Okay, whose idea was it to name that hook bbc_codes_parsing instead of integrate_bbc_codes_parsing.
integrate_additional_bbc, integrate_autolink_load, integrate_news_html_parser, integrate_html_parser_load, integrate_news_bbc_parser, integrate_item_codes, bbc_codes_parsing
Edit:
@emanuele Could you maybe give me a hint regarding what I'm missing? It's not working.
public static function bbc_codes_parsing(&$codes, &$itemcodes)
{
$codes[] = array(
BBC\Codes::ATTR_TAG => 'glow',
BBC\Codes::ATTR_TYPE => BBC\Codes::TYPE_UNPARSED_COMMAS,
BBC\Codes::ATTR_TEST => '[#0-9a-zA-Z\-]',
BBC\Codes::ATTR_BEFORE => '<span style="text-shadow: $1 0 0 4px">',
BBC\Codes::ATTR_AFTER => '</span>',
BBC\Codes::ATTR_QUOTED => BBC\Codes::OPTIONAL,
BBC\Codes::ATTR_BLOCK_LEVEL => false,
BBC\Codes::ATTR_AUTOLINK => true,
BBC\Codes::ATTR_LENGTH => 4,
);
$codes[] = array(
BBC\Codes::ATTR_TAG => 'shadow',
BBC\Codes::ATTR_TYPE => BBC\Codes::TYPE_UNPARSED_COMMAS,
BBC\Codes::ATTR_TEST => '[#0-9a-zA-Z\-]{3,12},(left|right|top|bottom|[0123]\d{0,2})\]',
BBC\Codes::ATTR_BEFORE => '<span style="text-shadow: $1 $2">',
BBC\Codes::ATTR_AFTER => '</span>',
BBC\Codes::ATTR_VALIDATE => function(&$tag, &$data, $disabled) {
if ($data[0] == 'top' || (is_numeric($data[1]) && $data[1] < 50))
$data[1] = '0 -2px 1px';
elseif ($data[1] == 'right' || (is_numeric($data[1]) && $data[1] < 100))
$data[1] = '2px 0 1px';
elseif ($data[1] == 'bottom' || (is_numeric($data[1]) && $data[1] < 190))
$data[1] = '0 2px 1px';
elseif ($data[1] == 'left' || (is_numeric($data[1]) && $data[1] < 280))
$data[1] = '-2px 0 1px';
else
$data[1] = '1px 1px 1px';},
BBC\Codes::ATTR_QUOTED => BBC\Codes::OPTIONAL,
BBC\Codes::ATTR_BLOCK_LEVEL => false,
BBC\Codes::ATTR_AUTOLINK => true,
BBC\Codes::ATTR_LENGTH => 6,
);
// test; working
$codes[] = array(
BBC\Codes::ATTR_TAG => 'j',
BBC\Codes::ATTR_TYPE => BBC\Codes::TYPE_PARSED_CONTENT,
BBC\Codes::ATTR_BEFORE => '<strong class="bbc_strong">',
BBC\Codes::ATTR_AFTER => '</strong>',
BBC\Codes::ATTR_BLOCK_LEVEL => false,
BBC\Codes::ATTR_AUTOLINK => true,
BBC\Codes::ATTR_LENGTH => 1,
);
}