2022-01-27 */ require_once(__DIR__.'/ui.php'); $template->title = "Shortcode [{$slug}]"; $shortcode = \AddonShortcodeQuery::create() ->findOneByShortcode($slug); if (!$shortcode) { // not found in db \Util::Redirect('/'); } $shortcodePlugins = $shortcode->getAddons(\AddonQuery::create()->filterByType('plugin')); $shortcodeThemes = $shortcode->getAddons(\AddonQuery::create()->filterByType('theme')); if (!$shortcodePlugins->count() && !$shortcodeThemes->count()) { // nothing to show. \Util::Redirect('/'); } $template->assign([ 'shortcodePlugins' => $shortcodePlugins, 'shortcodeThemes' => $shortcodeThemes ]); $template->display('reference/shortcode.tpl');