public static function is_dw_pods_page($id)
 {
     if (function_exists('pods_api')) {
         $pod_page = pods_api()->load_page(array('id' => $id));
         $pod_page_name = !empty($pod_page) ? $pod_page['name'] : '';
         if (!empty($pod_page_name) && is_pod_page($pod_page_name)) {
             return TRUE;
         }
     } else {
         global $pod_page_exists;
         if (is_int($id)) {
             $id = array($id);
         }
         if (in_array($pod_page_exists['id'], $id)) {
             return TRUE;
         }
     }
     return FALSE;
 }
 /**
  * dynWid::detectPage() Page detection
  *
  * @return string
  */
 public function detectPage()
 {
     // First we register the Path URL
     $this->url = $_SERVER['REQUEST_URI'];
     if (is_front_page() && get_option('show_on_front') == 'posts') {
         return 'front-page';
     } else {
         if (is_home() && get_option('show_on_front') == 'page') {
             return 'front-page';
         } else {
             if (is_attachment()) {
                 return 'attachment';
                 // must be before is_single(), otherwise detects as 'single'
             } else {
                 if (is_single()) {
                     return 'single';
                 } else {
                     if (is_page()) {
                         return 'page';
                     } else {
                         if (is_author()) {
                             return 'author';
                         } else {
                             if (is_category()) {
                                 return 'category';
                             } else {
                                 if (is_tag()) {
                                     return 'tag';
                                 } else {
                                     if (function_exists('is_post_type_archive') && is_post_type_archive()) {
                                         return 'cp_archive';
                                         // must be before is_archive(), otherwise detects as 'archive' in WP 3.1.0
                                     } else {
                                         if (function_exists('is_tax') && is_tax()) {
                                             return 'tax_archive';
                                         } else {
                                             if (is_archive() && !is_category() && !is_author() && !is_tag()) {
                                                 return 'archive';
                                             } else {
                                                 if (function_exists('bbp_is_single_user') && (bbp_is_single_user() || bbp_is_single_user_edit())) {
                                                     // must be before is_404(), otherwise bbPress profile page is detected as 'e404'.
                                                     return 'bbp_profile';
                                                 } else {
                                                     if (is_404()) {
                                                         return 'e404';
                                                     } else {
                                                         if (is_search()) {
                                                             return 'search';
                                                         } else {
                                                             if (function_exists('is_pod_page') && is_pod_page()) {
                                                                 return 'pods';
                                                             } else {
                                                                 return 'undef';
                                                             }
                                                         }
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }
Exemple #3
0
function bb_redirect_to_first_child()
{
    global $post;
    # UNCOMMENT THE LINE BELOW TO DISABLE FOR CHILD PAGES (ie not to level pages)
    //if($post->post_parent != 0) return;
    if (!empty($post->ID)) {
        $pagekids = get_pages("child_of=" . $post->ID . "&sort_column=menu_order");
        if (function_exists('pods_menu')) {
            if (is_pod_page()) {
                break;
            }
        }
        if (!get_post_meta($post->ID, 'dont_redirect', true) && $pagekids && !isset($_GET['s']) && is_page()) {
            $firstchild = $pagekids[0];
            wp_redirect(get_permalink($firstchild->ID));
        }
    }
}
Exemple #4
0
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width">

        <link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600' rel='stylesheet' type='text/css'>

        <link rel="stylesheet" href="<?php 
bloginfo('template_url');
?>
/style.css">

        <script src="<?php 
bloginfo('template_url');
?>
/js/vendor/modernizr-2.6.2.min.js"></script>
        <?php 
if (is_pod_page('start')) {
    ?>
        <script src="<?php 
    bloginfo('template_url');
    ?>
/js/vendor/jquery-1.9.1.min.js"></script>
        <?php 
}
?>

    </head>
    <body>

        <div class="wrapper">

            <div class="login-hide">