function _shortcode_postprocess_text in Shortcode 7
Same name and namespace in other branches
- 6 shortcode.module \_shortcode_postprocess_text()
- 7.2 shortcode.module \_shortcode_postprocess_text()
1 call to _shortcode_postprocess_text()
- shortcode_filter in ./
shortcode.module - Implementation of hook_filter().
File
- ./
shortcode.module, line 387
Code
function _shortcode_postprocess_text($text) {
//return $text;
$patterns = array(
'|#!#|is',
'!<p>( |\\s)*(<\\/*div>)!is',
'!<p>( |\\s)*(<div)!is',
'!(<\\/div.*?>)\\s*</p>!is',
'!(<div.*?>)\\s*</p>!is',
);
/*
*
*/
//$replacements = array('!!\\2', '###\\2', '@@@\\1');
$replacements = array(
'',
'\\2',
'\\2',
'\\1',
'\\1',
);
return preg_replace($patterns, $replacements, $text);
}