function _cookie_content_blocker_match_tags in Cookie Content Blocker 7
Match all our custom HTML element nodes with their settings and children.
We use our own custom non-existent HTML element node '<cookiecontentblocker>' using a node element makes it easier to work with in WYSIWYG editors.
Parameters
string $text: The HTML/Text string.
Return value
array A keyed array containing:
- (0) An array of full pattern matches.
- (1) An array of strings defining settings for each associated match.
- (2) An array of strings defining the content for each associated match.
1 call to _cookie_content_blocker_match_tags()
- _cookie_content_blocker_replace_tags in ./
cookie_content_blocker.module - Replaces cookie content blocker tags for the given text.
File
- ./
cookie_content_blocker.module, line 472 - Contains the main module code for Cookie content blocker.
Code
function _cookie_content_blocker_match_tags($text) {
preg_match_all('/<cookiecontentblocker.*?(?:data-settings="(.*?)".*?)*?>(.*?)<\\/cookiecontentblocker>/s', $text, $matches);
return array(
$matches[0],
$matches[1],
$matches[2],
);
}