function wptouch_render_menu_page($page_options)
{
    wptouch_add_sub_page(WPTOUCH_ADMIN_MENU_ICONS_OPTIONS, 'menu-icons-options', $page_options);
    wptouch_add_sub_page(WPTOUCH_ADMIN_MENU_ICONS_MENUS, 'menu-icons-menus', $page_options);
    wptouch_add_sub_page(WPTOUCH_ADMIN_MENU_MANAGE_ICON_SETS, 'menu-icons-manage-icon-sets', $page_options);
    global $wptouch_pro;
    $theme_menus = $wptouch_pro->theme_menus;
    if (count($theme_menus)) {
        foreach ($theme_menus as $menu) {
            wptouch_add_page_section(WPTOUCH_ADMIN_MENU_ICONS_OPTIONS, $menu->friendly_name, 'setup-menu-icons-' . $menu->setting_name, array(wptouch_add_setting('list', $menu->setting_name, $menu->description, $menu->tooltip, WPTOUCH_SETTING_BASIC, '3.0', wptouch_get_custom_menu_list(true, $menu->can_be_disabled))), $page_options, $menu->settings_domain);
        }
    }
    wptouch_add_page_section(WPTOUCH_ADMIN_MENU_ICONS_OPTIONS, __('Menu Options', 'wptouch-pro'), 'setup-menu-parent-items', array(wptouch_add_setting('checkbox', 'enable_menu_icons', __('Use menu icons', 'wptouch-pro'), '', WPTOUCH_SETTING_ADVANCED, '3.0')), $page_options);
    wptouch_add_page_section(WPTOUCH_ADMIN_MENU_ICONS_MENUS, '', 'admin_menu_icons_menus', array(wptouch_add_setting('custom', 'icon_menu_area')), $page_options);
    wptouch_add_page_section(WPTOUCH_ADMIN_MENU_MANAGE_ICON_SETS, __('Icon Upload', 'wptouch-pro'), 'admin_menu_icon_upload', array(wptouch_add_setting('custom', 'custom_icon_upload')), $page_options);
    wptouch_add_page_section(WPTOUCH_ADMIN_MENU_MANAGE_ICON_SETS, __('Uploaded Icons', 'wptouch-pro'), 'uploaded-icons', array(wptouch_add_setting('custom', 'custom_icon_management')), $page_options);
    wptouch_add_page_section(WPTOUCH_ADMIN_MENU_MANAGE_ICON_SETS, __('Icon Sets', 'wptouch-pro'), 'admin_menu_icon_sets', array(wptouch_add_setting('custom', 'installed_icon_sets')), $page_options);
    return $page_options;
}
function wptouch_setup_menu_icons_tab()
{
    wptouch_add_tab(__('Menu + Icons', 'wptouch-pro'), 'menu_and_icons', array(__('General Settings', 'wptouch-pro') => array('general-settings', array(array('section-start', 'general-menu-options', __('Drop-Down Menu', 'wptouch-pro')), array('list', 'custom_menu_name', __('WPtouch Pro Menu', 'wptouch-pro'), '', wptouch_get_custom_menu_list()), array('list', 'menu_sort_order', __('Menu sort order (WordPress Pages menu only)', 'wptouch-pro'), __('Used to adjust the menu sort order for WPtouch Pro themes ', 'wptouch-pro'), array('wordpress' => __('Sort by admin page order', 'wptouch-pro'), 'alpha' => __('Sort alphabetically', 'wptouch-pro'))), array('section-end'), array('spacer'), array('section-start', 'additional-menu-items', __('Additional Menu Items', 'wptouch-pro')), array('checkbox', 'menu_show_home', sprintf(__('Add a link to %sHome%s in the menu', 'wptouch-pro'), '<strong>', '</strong>'), ''), array('checkbox', 'menu_show_rss', sprintf(__('Add a link to the site %sRSS%s feed in the menu', 'wptouch-pro'), '<strong>', '</strong>'), ''), array('text', 'menu_custom_rss_url', __('&harr; Use this RSS feed URL', 'wptouch-pro'), __('You can enter a custom RSS URL here, such as a FeedBurner feed. When left blank, the default website RSS Feed is used.', 'wptouch-pro'), '', 'menu_custom_rss_url', true), array('checkbox', 'menu_show_email', __('Add a link for the admin <strong>Email</strong> in the menu', 'wptouch-pro'), ''), array('text', 'menu_custom_email_address', __('&harr; Use this e-mail address', 'wptouch-pro'), __('You can enter a custom email address here. When left blank the default admin email is used.', 'wptouch-pro'), '', 'menu_show_email', true), array('section-end'), array('spacer'), array('section-start', 'advanced-menu-options', __('Advanced', 'wptouch-pro')), array('checkbox', 'enable_menu_icons', __('Use menu icons', 'wptouch-pro'), __('When unchecked no icons will be shown beside menu items, even if configured in Menu + Icons.', 'wptouch-pro')), array('checkbox', 'glossy_bookmark_icon', __('Use glossy bookmark icon', 'wptouch-pro'), __('If unchecked your bookmark icon will be set as "apple-touch-icon-precomposed", and not have the glossy effect applied to it.', 'wptouch-pro')), array('checkbox', 'menu_disable_parent_as_child', __('Disable duplicate parent as 1st child link', 'wptouch-pro'), __('Check this to disable showing each menu parent as a clickable child item. NOTE: Parent link will not be accessible with this option enabled.', 'wptouch-pro')), array('checkbox', 'disable_menu', __('Disable drop-down menu completely', 'wptouch-pro'), __('Check this to disable the WPtouch menus altogether (useful for custom themes with menus built outside our code that do not use  WPtouch Pro settings).', 'wptouch-pro')), array('checkbox', 'cache_menu_tree', __('Cache menu items to reduce database queries', 'wptouch-pro'), ''), array('text', 'cache_time', __('Number of seconds to cache menu tree items for', 'wptouch-pro'), ''), array('section-end'))), __('Menu and Icon Setup', 'wptouch-pro') => array('menu-and-icon-setup', array(array('section-start', 'icon-pool', __('Icon Pool', 'wptouch-pro')), array('icon-picker'), array('section-end'))), __('Manage Icons and Sets', 'wptouch-pro') => array('upload_icons_and_sets', array(array('section-start', 'upload-icons', __('Upload Icons + Icon Sets', 'wptouch-pro')), array('manage-sets'), array('section-end'))), __('Custom Menu Items', 'wptouch-pro') => array('custom-menu-icons', array(array('section-start', 'custom-menu-items', __('Custom Menu Items', 'wptouch-pro')), array('copytext', 'copytext-menu-items', __('You can enter up to 3 custom menu links to be shown in the WPtouch header menu.', 'wptouch-pro')), array('text', 'custom_menu_text_1', sprintf(__('Custom menu title %s', 'wptouch-pro'), 1)), array('text', 'custom_menu_link_1', sprintf(__('Custom menu URL %s', 'wptouch-pro'), 1)), array('list', 'custom_menu_position_1', sprintf(__('Custom menu position %s', 'wptouch-pro'), 1), __('Select whether the link is shown above or below the WP pages in your menu', 'wptouch-pro'), array('top' => __('Top', 'wptouch-pro'), 'bottom' => __('Bottom', 'wptouch-pro'))), array('checkbox', 'custom_menu_force_external_1', __('Force URL to leave Web-App Mode', 'wptouch-pro'), __('URL will be opened in Mobile Safari.  This feature is sometimes required for external links.', 'wptouch-pro')), array('spacer'), array('text', 'custom_menu_text_2', sprintf(__('Custom menu title %s', 'wptouch-pro'), 2)), array('text', 'custom_menu_link_2', sprintf(__('Custom menu URL %s', 'wptouch-pro'), 2)), array('list', 'custom_menu_position_2', sprintf(__('Custom menu position %s', 'wptouch-pro'), 2), '', array('top' => __('Top', 'wptouch-pro'), 'bottom' => __('Bottom', 'wptouch-pro'))), array('checkbox', 'custom_menu_force_external_2', __('Force URL to leave Web-App Mode', 'wptouch-pro')), array('spacer'), array('text', 'custom_menu_text_3', sprintf(__('Custom menu title %s', 'wptouch-pro'), 3)), array('text', 'custom_menu_link_3', sprintf(__('Custom menu URL %s', 'wptouch-pro'), 3)), array('list', 'custom_menu_position_3', sprintf(__('Custom menu position %s', 'wptouch-pro'), 3), '', array('top' => __('Top', 'wptouch-pro'), 'bottom' => __('Bottom', 'wptouch-pro'))), array('checkbox', 'custom_menu_force_external_3', __('Force URL to leave Web-App Mode', 'wptouch-pro')), array('section-end')))));
}
Beispiel #3
0
_e('None', 'wptouch-pro');
?>
</a></li> |
				<li><a href="#" class="reset-all"><?php 
_e('Reset', 'wptouch-pro');
?>
</a></li>
			</ul>
			<?php 
_e('Menu', 'wptouch-pro');
?>

			<select name="menu-list" id="menu-list">
				<?php 
global $wptouch_pro;
$menus = wptouch_get_custom_menu_list();
$rendered_menus = array();
?>

				<?php 
foreach ($wptouch_pro->theme_menus as $menu_info) {
    $menu_id = wptouch_get_menu_name_from_slug($menu_info->setting_name);
    if (!in_array($menu_id, $rendered_menus)) {
        $rendered_menus[] = $menu_id;
        if ($menu_id == 'none') {
            continue;
        }
        ?>
					<option value="menu-<?php 
        echo $menu_id;
        ?>