mysite_edit_menu()
mysite.module, line 3152
Create a list of submenu items for the user's Settings page.
An array of key-value pairs used to build the submenu for a user's MySite settings, where the key is the editing stage and the value is the text to display.
function mysite_edit_menu() {
static $items = array();
if (empty($items)) {
$uid = arg(1);
$pages = mysite_get_pages($uid);
// must run checks to see what options are available.
$types = variable_get('mysite_content', NULL);
$themes = variable_get('mysite_theme_settings', array());
$layouts = mysite_get_includes('layouts');
$styles = mysite_get_includes('styles');
$formats = mysite_get_includes('formats');
foreach ($pages as $key => $value) {
// always include this one
$items[$key]['personal'] = array('label' => t('Page Settings'), 'help' => t('Your personal pages let you organize content so that you can quickly view items of interest to you. The settings below control how others will view this page.'));
if (!empty($types['theme']) && !empty($themes)) {
$items[$key]['theme'] = array('label' => t('Page Theme'), 'help' => t('You may choose to view your personal pages in a custom theme. Choose from one of the options below.'));
}
if (count($layouts) > 1) {
$items[$key]['layout'] = array('label' => t('Content Layout'), 'help' => t('You may arrange content on your personal page according to the layout of the page. Select one of the options below.'));
}
if (count($styles) > 1) {
$items[$key]['style'] = array('label' => t('Content Style'), 'help' => t('You may select from a variety of styles to display content on your personal page. Select one of the options below.'));
}
if (count($formats) > 1) {
$items[$key]['format'] = array('label' => t('Display Format'), 'help' => t('Choose how you would prefer to view content on your personal page.'));
}
}
}
return $items;
}