mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-04 12:17:42 +02:00
Shortcodes API: shortcode name issue #53
This commit is contained in:
@@ -148,8 +148,8 @@
|
|||||||
if ( ! Shortcode::$shortcode_tags) return $content;
|
if ( ! Shortcode::$shortcode_tags) return $content;
|
||||||
|
|
||||||
$shortcodes = implode('|', array_map('preg_quote', array_keys(Shortcode::$shortcode_tags)));
|
$shortcodes = implode('|', array_map('preg_quote', array_keys(Shortcode::$shortcode_tags)));
|
||||||
$pattern = "/(.?)\{($shortcodes)(.*?)(\/)?\}(?(4)|(?:(.+?)\{\/\s*\\2\s*\}))?(.?)/s";
|
$pattern = "/(.?)\{([$shortcodes]+)(.*?)(\/)?\}(?(4)|(?:(.+?)\{\/\s*\\2\s*\}))?(.?)/s";
|
||||||
|
|
||||||
return preg_replace_callback($pattern, 'Shortcode::_handle', $content);
|
return preg_replace_callback($pattern, 'Shortcode::_handle', $content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user