/** * */ function miss_shortcodes_init() { foreach (miss_shortcodes() as $shortcodes) { require_once THEME_SHORTCODES . '/' . $shortcodes; } if (is_admin()) { return; } # Long posts should require a higher limit, see http://core.trac.wordpress.org/ticket/8553 //@ini_set('pcre.backtrack_limit', 9000000); foreach (miss_shortcodes() as $shortcodes) { $class = 'miss' . ucfirst(preg_replace('/[0-9-_]/', '', str_replace('.php', '', $shortcodes))); $class_methods = get_class_methods($class); if (isset($class_methods)) { foreach ($class_methods as $shortcode) { if ($shortcode[0] != '_' && $class != 'missLayouts') { add_shortcode($shortcode, array($class, $shortcode)); } } } } }
/** * Theme shortcode generator */ function miss_shortcode_generator() { global $irish_framework_params; $shortcodes = miss_shortcodes(); $options = array(); foreach ($shortcodes as $shortcode) { $shortcode = str_replace('.php', '', $shortcode); $shortcode = preg_replace('/[0-9-]/', '', $shortcode); if ($shortcode[0] != '_') { $class = 'miss' . ucwords($shortcode); $options[] = call_user_func(array(&$class, '_options'), $class); } } return $options; }