aboutsummaryrefslogtreecommitdiff
path: root/mod/developers/start.php
blob: 46cdd8bc2e6eff5458cbd0285c24d1543356c4b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
/**
 * Elgg developer tools
 */

elgg_register_event_handler('init', 'system', 'developers_init');

function developers_init() {
	elgg_register_event_handler('pagesetup', 'system', 'developers_setup_menu');

	elgg_extend_view('css/admin', 'developers/css');

	$action_base = elgg_get_plugins_path() . 'developers/actions/developers';
	elgg_register_action('developers/settings', "$action_base/settings.php", 'admin');
}

function developers_setup_menu() {
	if (elgg_in_context('admin')) {
		elgg_add_admin_menu_item('developers', elgg_echo('admin:developers'));
		elgg_add_admin_menu_item('settings', elgg_echo('admin:developers:settings'), 'developers');
		elgg_add_admin_menu_item('preview', elgg_echo('admin:developers:preview'), 'developers');
	}
}