Пример #1
0
function wptouch_recursive_find_page($page_id, $menu_items)
{
    $icon = false;
    foreach ($menu_items as $key => $item) {
        if (isset($item->original_id) && $item->original_id == $page_id) {
            $icon = wptouch_get_site_menu_icon($item->page_id);
        } else {
            if (isset($item->has_children) && $item->has_children) {
                $icon = wptouch_recursive_find_page($page_id, $item->submenu);
            }
        }
        if ($icon) {
            return $icon;
        }
    }
}
Пример #2
0
 function add_mobile_header_info()
 {
     $settings = $this->get_settings();
     if ($this->get_active_device_class() == "ipad") {
         require_once WPTOUCH_DIR . '/include/template-tags/menu.php';
         if ($settings->glossy_bookmark_icon) {
             $bookmark_icon = "<link rel='apple-touch-icon' href='" . wptouch_get_site_menu_icon(WPTOUCH_ICON_TABLET_BOOKMARK) . "' />\n";
         } else {
             $bookmark_icon = "<link rel='apple-touch-icon-precomposed' href='" . wptouch_get_site_menu_icon(WPTOUCH_ICON_TABLET_BOOKMARK) . "' />\n";
         }
     } else {
         if ($settings->glossy_bookmark_icon) {
             $bookmark_icon = "<link rel='apple-touch-icon' href='" . wptouch_get_site_menu_icon(WPTOUCH_ICON_BOOKMARK) . "' />\n";
         } else {
             $bookmark_icon = "<link rel='apple-touch-icon-precomposed' href='" . wptouch_get_site_menu_icon(WPTOUCH_ICON_BOOKMARK) . "' />\n";
         }
     }
     echo apply_filters('wptouch_bookmark_meta', $bookmark_icon);
     // Add the default stylesheet to the end, use min if available
     $minfile = TEMPLATEPATH . '/style.min.css';
     if (file_exists($minfile)) {
         $this->css_files[] = wptouch_get_bloginfo('template_directory') . '/style.min.css?ver=' . wptouch_refreshed_files();
     } else {
         $this->css_files[] = wptouch_get_bloginfo('template_directory') . '/style.css?ver=' . wptouch_refreshed_files();
     }
     // Check for an active skin
     if ($settings->current_theme_skin != 'none') {
         $current_theme = $this->get_current_theme_info();
         if (isset($current_theme->skins[$settings->current_theme_skin])) {
             $this->css_files[] = $current_theme->skins[$settings->current_theme_skin]->skin_url;
         }
     }
     $this->css_files = apply_filters('wptouch_theme_css_files', $this->css_files);
     foreach ($this->css_files as $css) {
         echo "<link rel='stylesheet' type='text/css' media='screen' href='{$css}' />\n";
     }
 }
Пример #3
0
function wptouch_the_site_menu_icon($icon_type)
{
    echo wptouch_get_site_menu_icon($icon_type);
}
<!-- Depreciated in favor of add2home script, configure customizations in theme.js -->
<?php 
if (show_webapp_notice()) {
    ?>
	<div id="web-app-overlay">
		<img src="<?php 
    wptouch_bloginfo('template_directory');
    ?>
/images/bubble-arrow.png" alt="bubble-arrow" id="bubble-arrow" />
		<a href="#" id="close-wa-overlay">X</a>
		<img src="<?php 
    echo wptouch_get_site_menu_icon(WPTOUCH_ICON_BOOKMARK);
    ?>
" alt="bookmark-icon" />
		<h2><?php 
    wptouch_bloginfo('site_title');
    ?>
</h2>
		<h3><?php 
    _e("is now web-app enabled!", "wptouch-pro");
    ?>
</h3>
		<p><?php 
    echo sprintf(__("Save %s as a web-app on your Home Screen.", "wptouch-pro"), wptouch_get_bloginfo('site_title'));
    ?>
</p>
		<p><?php 
    _e("Tap the button above, then Add to Home Screen.", "wptouch-pro");
    ?>
</p>
	</div>