Esempio n. 1
0
    show_admin_bar(false);
}
?>
    <base href="<?php 
bloginfo('url');
?>
/" />
    <meta http-equiv="Content-Type" content="<?php 
bloginfo('html_type');
?>
; charset=<?php 
bloginfo('charset');
?>
" />
    <title><?php 
echo wiziapp_apply_request_title(wp_title('&laquo;', false, 'right') . get_bloginfo('name'));
?>
</title>
    <meta name="viewport" content="width=device-width,user-scalable=no" />
    <link rel="stylesheet" href="<?php 
bloginfo('stylesheet_url');
?>
" type="text/css" media="screen" />
    <link rel="pingback" href="<?php 
bloginfo('pingback_url');
?>
" />
    <?php 
wp_head();
/**
 * When we are coming from a single post page we need to include the script as is, but in a
Esempio n. 2
0
function wiziapp_buildCategoryPage($category_id)
{
    $screen_conf = $GLOBALS['WiziappScreens']->getScreenLayout('posts');
    $pageNumber = isset($_GET['wizipage']) ? $_GET['wizipage'] : 0;
    $numberOfPosts = WiziappConfig::getInstance()->posts_list_limit;
    $offset = $numberOfPosts * $pageNumber;
    $cat = get_category($category_id);
    $title = wiziapp_apply_request_title($cat->cat_name);
    $query = "cat={$category_id}&orderby=post_date&posts_per_page=" . $numberOfPosts . "&offset=" . $offset;
    // Find the total number of posts in the blog
    $totalPostsInCat = $cat->count;
    if ($totalPostsInCat < $offset) {
        echo json_encode(wiziapp_prepareSectionScreen(array(), $title, "List"));
        exit;
    }
    if ($numberOfPosts < $totalPostsInCat) {
        $showMore = $totalPostsInCat - $numberOfPosts;
    } else {
        $showMore = FALSE;
    }
    $posts = wiziapp_buildPostListPage($query, '', $screen_conf['items'], TRUE, $showMore, FALSE);
    $postsCount = count($posts);
    $totalShownPosts = $totalPostsInCat - ($offset + $postsCount);
    if ($totalShownPosts < $numberOfPosts) {
        $showMore = $totalShownPosts;
    } else {
        $showMore = $numberOfPosts;
    }
    if ($showMore) {
        $obj = new WiziappMoreCellItem('L1', array(sprintf(__("Load %d more items", 'wiziapp'), $showMore), $pageNumber + 1));
        $moreComponent = $obj->getComponent();
        $posts[] = $moreComponent;
    }
    $section = array();
    $section[] = array('section' => array('title' => '', 'id' => 'recent', 'items' => $posts));
    echo json_encode(wiziapp_prepareSectionScreen($section, $title, "List"));
    //    echo json_encode(wiziapp_prepareSectionScreen(array($posts), $title, "List"));
}
function wiziapp_content_get_video_headers($title)
{
    $header = array("screenTitle" => strip_tags(wiziapp_apply_request_title($title)));
    return $header;
}