Exemplo n.º 1
0
function wptouch_admin_get_root_slug($network_admin = false)
{
    $menu = wptouch_admin_get_predefined_menus();
    $settings = wptouch_get_settings();
    if (defined('WPTOUCH_IS_FREE')) {
        $show_wizard = $settings->show_free_wizard;
    } else {
        $show_wizard = $settings->show_wizard;
    }
    $show_network_wizard = $settings->show_network_wizard;
    $network_admin = is_network_admin();
    if ($network_admin) {
        if ($show_network_wizard) {
            return $menu[WPTOUCH_PRO_ADMIN_WIZARD]->slug;
        } else {
            return $menu[WPTOUCH_PRO_ADMIN_GENERAL_SETTINGS]->slug;
        }
    } else {
        if ($show_wizard) {
            return $menu[WPTOUCH_PRO_ADMIN_WIZARD]->slug;
        } else {
            if (defined('WPTOUCH_SHOW_WIZARD')) {
                return $menu[WPTOUCH_PRO_ADMIN_WIZARD]->slug;
            }
            return $menu[WPTOUCH_PRO_ADMIN_GENERAL_SETTINGS]->slug;
        }
    }
}
Exemplo n.º 2
0
function wptouch_admin_is_custom_page($slug = false)
{
    if (!$slug) {
        global $wptouch_panel_slug;
        $slug = $wptouch_panel_slug;
    }
    $menu_pages = wptouch_admin_get_predefined_menus();
    if (isset($menu_pages[$slug])) {
        return $menu_pages[$slug]->menu_type == WPTOUCH_PRO_ADMIN_CUSTOM_PAGE;
    }
}
Exemplo n.º 3
0
function wptouch_admin_get_root_slug()
{
    $menu = wptouch_admin_get_predefined_menus();
    return $menu[WPTOUCH_PRO_ADMIN_TOUCHBOARD]->slug;
}