mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-03 03:37:52 +02:00
Shortcodes API: Check if this shortcode realy exists then call user function else return empty string
This commit is contained in:
@@ -180,7 +180,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
return $prefix . call_user_func(Shortcode::$shortcode_tags[$shortcode], $attributes, $matches[5], $shortcode) . $suffix;
|
||||
// Check if this shortcode realy exists then call user function else return empty string
|
||||
return (isset(Shortcode::$shortcode_tags[$shortcode])) ? $prefix . call_user_func(Shortcode::$shortcode_tags[$shortcode], $attributes, $matches[5], $shortcode) . $suffix : '';
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user