function get_page_req_path() { $type = get_page_type(); $file = get_page_file(); $page_path = $type . "/" . $file . ".php"; // echo $page_path; return $page_path; }
function parse_event_html($schedule_html, $event_url) { $page_type = get_page_type($schedule_html); if ($page_type == WORLD_CURL) { $event = get_basic_event_information_wct($schedule_html, $event_url); $event->games = get_event_games_wct($event_url, $event); return $event; } else { if ($page_type == CCA) { $event = get_basic_event_information_cca($schedule_html, $event_url); $event->games = get_event_games_cca(get_html($event_url)); return $event; } } }
<?php /* Template Name: Sidebar Left, 2 Columns */ $template = get_template_type(); $page_type = get_page_type(); get_header_hierarchical('page'); ?> <section id="content" role="main"> <?php get_the_breadcrumb(); ?> <?php get_template_part_hierarchical('partials/loop', 'left_sidebar'); ?> </section> <?php get_sidebar_hierarchical('page'); get_footer_hierarchical('page');
$singular_page_type = !empty($_fmt) ? $_fmt : 'post'; } } return $singular_page_type; } /** * This will force the $page_type global to be set correctly while WP prepares its query * * The 'template_include' filter is documented in `wp-includes/template-load.php`. */ add_filter('template_include', function ($tpl) { global $page_type, $singular_page_type, $blog_page; unset($page_type); unset($singular_page_type); unset($blog_page); get_page_type(); is_blog_page(); get_singular_type(); return $tpl; }, 1000); // STICKY POSTS LOOPS /** * Check if current post is sticky and if it should be treated specially * * This returns `true` if the post is sticky for the following pages: * * - home / front page * - category */ function is_sticky_view() {
function is_page_type_content_only_wide() { return get_page_type() == 'content_only_wide'; }
function init_page_items($page) { global $pos_items; global $pos_page; $pos_page = $page; if ($pos_items) { return; } $pos_items = PagePos::load($page); $page_type = get_page_type(); if ($page_type == 'admin') { js_include_tag('jquery.colorbox-min'); css_include_tag('colorbox'); js_include_tag('admin/page_admin'); } }
<?php /** * @file view/theme/frio/default.php * * @brief load site template in dependence of the mode * You will find the site templates under: * {{?themepath}}/php/modes/ */ require_once 'view/theme/frio/php/frio_boot.php'; // Check if page is defined as model and set it as modal // This is a workaround, where we can't change the page the // page mode in the template with javascript $page_type = get_page_type($a->argv[0]); // This is uncommented because we don't need it anymore. // We try to to use links which resulting in $_GET["mode"] = "none" //if($page_type === "none") { // $_GET["mode"] = "none"; //} if (isset($_GET["mode"]) and $_GET["mode"] == "none") { require "view/theme/frio/php/modes/none.php"; } elseif ($page_type === "standard_page") { require "view/theme/frio/php/modes/standard.php"; } else { require "view/theme/frio/php/modes/default.php"; }