function page_manager_admin_paths

File

page_manager/page_manager.module, line 160

Code

function page_manager_admin_paths() {
    
    /* @todo FIX ME this is a major resource suck. */
    return;
    $items = array();
    ctools_include('page', 'page_manager', 'plugins/tasks');
    $pages = page_manager_page_load_all();
    foreach ($pages as $page) {
        // Make sure the page we're on is set to be an administrative path and that
        // it is not set to be a frontpage path.
        if (isset($page->conf['admin_paths']) && $page->conf['admin_paths'] && (!isset($page->make_frontpage) || !$page->make_frontpage)) {
            $path_parts = explode('/', $page->path);
            foreach ($path_parts as $key => $part) {
                if (strpos($part, '%') !== FALSE || strpos($part, '!') !== FALSE) {
                    $path_parts[$key] = '*';
                }
            }
            $path = implode('/', $path_parts);
            if ($page->menu['type'] == 'default tab') {
                array_pop($path_parts);
                $parent_path = implode('/', $path_parts);
                $items[$parent_path] = TRUE;
            }
            $items[$path] = TRUE;
        }
    }
    return $items;
}