コード例 #1
0
if ($GLOBALS['pods_toplevel_ancestor'] == 309) {
    get_template_part('nav', 'article');
    $nav_generated = true;
}
// /events (the whole Events section) or individual Event pod items
if ($current_post_id == 311 or in_array(311, get_post_ancestors($current_post_id)) or $GLOBALS['pods_toplevel_ancestor'] == 311) {
    get_template_part('nav', 'events');
    $nav_generated = true;
}
// /ua/award/ or /about/collaboration-opportunities/
if ($current_post_id == 489 or in_array(1890, get_post_ancestors($current_post_id))) {
    get_template_part('nav', 'empty');
    $nav_generated = true;
}
// /ua/conferences/
if ($nav_show_conferences or check_parent_conference(191) or check_parent_conference(229) or check_parent_conference(250) or check_parent_conference(268) or check_parent_conference(211) or check_parent_conference(284) or check_parent_conference(286) or check_parent_conference(106) or check_parent_conference(381) or check_parent_conference(391) or check_parent_conference(577) or check_parent_conference(1388)) {
    get_template_part('nav', 'conferences');
    $nav_generated = true;
}
// /about/whos-who/
if ($current_post_id == 421 or in_array(421, get_post_ancestors($current_post_id))) {
    get_template_part('nav', 'generic');
    get_template_part('nav', 'whoswho');
    $nav_generated = true;
}
if ($nav_generated == false) {
    get_template_part('nav', 'generic');
}
?>
            
  <div id="mailing-list-subscription">
コード例 #2
0
} elseif (check_parent_conference(284)) {
    // /ua/conferences/2006-berlin
    $pod_slug = '2006-berlin';
} elseif (check_parent_conference(211)) {
    // /ua/conferences/2006-johannesburg
    $pod_slug = '2006-johannesburg';
} elseif (check_parent_conference(268)) {
    // /ua/conferences/2006-mexico-city
    $pod_slug = '2006-mexico-city';
} elseif (check_parent_conference(250)) {
    // /ua/conferences/2005-london
    $pod_slug = '2005-london';
} elseif (check_parent_conference(229)) {
    // /ua/conferences/2005-shanghai
    $pod_slug = '2005-shanghai';
} elseif (check_parent_conference(191)) {
    // /ua/conferences/2005-new-york
    $pod_slug = '2005-new-york';
}
$pod = new Pod('conference', $pod_slug);
$button_links = $pod->get_field('links') ? $pod->get_field('links') : array();
if (count($button_links)) {
    // sort by menu_order of linked items
    foreach ($button_links as $sort_key => $sort_value) {
        $menu_order[$sort_key] = $sort_value['menu_order'];
    }
    array_multisort($menu_order, SORT_ASC, $button_links);
}
// add the conference homepage itself
array_unshift($button_links, array('post_title' => $pod->get_field('name'), 'guid' => "/ua/conferences/{$pod_slug}"));
if (count($button_links)) {