1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-03 19:57:57 +02:00

Shortcodes API: Check if this shortcode realy exists then call user function else return empty string

This commit is contained in:
Sergey Romanenko
2012-11-23 13:57:57 +02:00
parent 9b4781f8be
commit c73abd0a72

View File

@@ -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 : '';
}
}