示例#1
0
function wptouch_the_custom_page_template_id()
{
    echo wptouch_get_custom_page_template_id();
}
示例#2
0
function wptouch_page_get_icon()
{
    global $wptouch_pro;
    if (wptouch_page_has_icon()) {
        if (wptouch_is_custom_page_template()) {
            $page_id = wptouch_get_custom_page_template_id();
        } else {
            $page_id = get_the_ID();
        }
        // If we're not in the loop yet, let's grab the first post and then rewind
        if (!$page_id) {
            if (have_posts()) {
                the_post();
                rewind_posts();
                $page_id = get_the_ID();
            }
        }
        $settings = wptouch_get_settings();
        if ($settings->custom_menu_name != 'none') {
            $menu_items = array();
            wptouch_build_wordpress_menu_tree(0, 1, $menu_items, true);
            $icon = wptouch_recursive_find_page($page_id, $menu_items);
            if ($icon) {
                return $icon;
            } else {
                return wptouch_get_site_menu_icon(-1000000);
            }
        } else {
            return wptouch_get_site_menu_icon($page_id);
        }
    } else {
        return false;
    }
}