mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-07-31 18:30:20 +02:00
Shortcodes API: shortcode name issue #53
This commit is contained in:
@@ -148,7 +148,7 @@
|
||||
if ( ! Shortcode::$shortcode_tags) return $content;
|
||||
|
||||
$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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user