diff options
Diffstat (limited to 'mod/developers/start.php')
-rw-r--r-- | mod/developers/start.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mod/developers/start.php b/mod/developers/start.php index 46cdd8bc2..5763d5d34 100644 --- a/mod/developers/start.php +++ b/mod/developers/start.php @@ -10,6 +10,8 @@ function developers_init() { elgg_extend_view('css/admin', 'developers/css'); + register_page_handler('theme_preview', 'developers_theme_preview_controller'); + $action_base = elgg_get_plugins_path() . 'developers/actions/developers'; elgg_register_action('developers/settings', "$action_base/settings.php", 'admin'); } @@ -20,4 +22,20 @@ function developers_setup_menu() { elgg_add_admin_menu_item('settings', elgg_echo('admin:developers:settings'), 'developers'); elgg_add_admin_menu_item('preview', elgg_echo('admin:developers:preview'), 'developers'); } +} + +/** + * Serve the theme preview pages + * + * @param array $page + */ +function developers_theme_preview_controller($page) { + if (!isset($page[0])) { + $page[0] = 'index'; + } + + $title = elgg_echo("theme_preview:{$page[0]}"); + $page = elgg_view("theme_preview/{$page[0]}"); + + echo elgg_view_page($title, $page, 'theme_preview'); }
\ No newline at end of file |