Example #1
0
/**
 * Return the current dashboard action
 *
 * @package Infinity
 * @subpackage dashboard
 * @return string|null
 */
function infinity_dashboard_cpanel_action()
{
    $route = infinity_screens_route_parse();
    if ($route && $route['screen'] == 'cpanel') {
        if ($route['action']) {
            return $route['action'];
        } else {
            return array_shift(infinity_dashboard_cpanel_actions());
        }
    }
    return null;
}
Example #2
0
/**
 * Retrieve a specific route param by offset
 *
 * @package Infinity-api
 * @subpackage screens
 * @param integer $offset
 * @return mixed
 */
function infinity_screens_route_param($offset)
{
    $route = infinity_screens_route_parse();
    if (isset($route['params'][--$offset])) {
        return $route['params'][$offset];
    }
    return null;
}