示例#1
0
function my_class_names($classes)
{
    global $locale;
    $classes[] = $locale;
    $filepath = get_page_slug();
    $classes[] = $filepath;
    return array_unique($classes);
}
function bm_show()
{
    global $BMPAGEURL;
    $url = strval(get_page_slug(false));
    if ($url == $BMPAGEURL) {
        $content = '';
        if (isset($_GET['page'])) {
            $index = $_GET['page'];
            bm_show_page($index);
        } else {
            bm_show_page();
        }
    }
    return $content;
    //echo '<p>I like to echo "Hello World" in the footers of all themes.</p>';
}
示例#3
0
        <title><?php 
get_page_clean_title();
?>
 - <?php 
get_site_name();
?>
</title>

        <!--[if IE]>
        <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->

    </head>

    <body id="<?php 
get_page_slug();
?>
">
        <div id="body-container">
            <!--SIDEBAR DIV CONTAINER-->
            <div id="sidebar-container" style="background-image:url(<?php 
echo $themeurl;
?>
/images/noise_pale.jpg)">
                <div id="side-header">
                    <div id="side-heading">
                        <img src="<?php 
echo $themeurl;
?>
/images/menu_header.jpg" width="208" height="123" alt="Sidebar Menu Header" />
                    </div>
示例#4
0
			<div class="wrapper">
				
				<!-- logo/sitename -->
				<a href="<?php 
get_site_url();
?>
" id="logo" ><?php 
get_site_name();
?>
</a>
				
				<!-- main navigation -->
				<nav id="main-nav">
					<ul>
						<?php 
get_navigation(get_page_slug(FALSE));
?>
					</ul>
				</nav>
			</div>
		</div>
		
		<!-- breadcrumbs: only show when NOT on homepage -->
		<p class="breadcrumbs" >
			<span class="wrapper">
				<a href="<?php 
get_site_url();
?>
">Home</a> &nbsp;&nbsp;&#149;&nbsp;&nbsp; <?php 
Innovation_Parent_Link(get_parent(FALSE));
?>
示例#5
0
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        
        <!-- Website Name -->
        <a class="navbar-brand" href="<?php 
get_site_url();
?>
" title="<?php 
get_site_name();
?>
"><?php 
get_site_name();
?>
</a>
      
      </div>
      
      <!-- Get navigation items : Defined in functions.php -->
      <div class="navbar-collapse collapse navbar-responsive-collapse">
        <ul class="nav navbar-nav">
          <?php 
bootstrap_get_navigation(get_page_slug(FALSE));
?>
        </ul>
      </div>
      
    </div>
  </div>
  <!-- END Navigation -->
function nm_frontend_init()
{
    global $NMPAGEURL, $nmpagetype, $nmsingletag;
    if (function_exists('i18n_init')) {
        i18n_init();
    }
    // I18N plugin
    $nmpagetype = array();
    nm_i18n_merge();
    if (strval(get_page_slug(false)) == $NMPAGEURL) {
        global $content, $metad;
        $metad_orig = $metad == '' ? ' ' : $metad;
        $metad = ' ';
        $nmpagetype[] = 'site';
        ob_start();
        echo PHP_EOL;
        if (isset($_POST['search'])) {
            nm_reset_options('search');
            nm_show_search_results();
            $nmpagetype[] = 'search';
        } elseif (isset($_GET[NMPARAMARCHIVE])) {
            nm_reset_options('archive');
            if (nm_show_archive($_GET[NMPARAMARCHIVE], false)) {
                $nmpagetype[] = 'archive';
            }
        } elseif (isset($_GET[NMPARAMTAG])) {
            $tag = rawurldecode($_GET[NMPARAMTAG]);
            $result = false;
            nm_reset_options('tag');
            if (nm_get_option('tagpagination')) {
                $index = isset($_GET[NMPARAMPAGE]) ? intval($_GET[NMPARAMPAGE]) : NMFIRSTPAGE;
                $result = nm_show_tag_page($tag, $index, false);
            } else {
                $result = nm_show_tag($tag, false);
            }
            if ($result) {
                $nmpagetype[] = 'tag';
                $nmsingletag = $tag;
            }
        } elseif (isset($_GET[NMPARAMPOST])) {
            nm_reset_options('single');
            if (nm_show_post($_GET[NMPARAMPOST], false, false, true)) {
                $nmpagetype[] = 'single';
                if (nm_get_option('metakeywordstags')) {
                    nm_update_meta_keywords();
                }
                if (nm_get_option('autometad')) {
                    $metad = nm_post_excerpt(150, null, false);
                }
            }
        } elseif (isset($_GET[NMPARAMPAGE]) && intval($_GET[NMPARAMPAGE]) > NMFIRSTPAGE) {
            nm_reset_options('main');
            nm_show_page($_GET[NMPARAMPAGE], false);
            $nmpagetype[] = 'main';
        } else {
            $metad = $metad_orig;
            nm_reset_options('main');
            nm_show_page(NMFIRSTPAGE, false);
            array_push($nmpagetype, 'main', 'home');
        }
        $content = nm_ob_get_content(false);
        $content = addslashes(htmlspecialchars($content, ENT_QUOTES, 'UTF-8'));
        if (nm_get_option('templatefile')) {
            nm_switch_template_file(nm_get_option('templatefile'));
        }
    }
    nm_update_page_title();
    nm_reset_options();
}
function return_page_slug()
{
    return get_page_slug(false);
}
示例#8
0
/**
 * @depreciated as of 2.04
 */
function return_page_slug()
{
    return get_page_slug(FALSE);
}
示例#9
0
function fossa_hier_menu()
{
    echo "<div class=\"breadcrumb\"><b>You are here:</b>&nbsp;&nbsp;&nbsp;";
    get_breadcrumb_navigation(get_page_slug(false), '•', true);
    echo "</div>";
}
示例#10
0
        </div>
      </div>
    </div>
  </footer>
  
  <!-- Include the JavaScripts -->
  <script src="//code.jquery.com/jquery-1.11.1.min.js"></script><!-- jQuery Core -->
  <script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script><!-- Bootstrap Core -->
  <script src="<?php 
get_theme_url();
?>
/assets/js/reina.min.js"></script><!-- RetinaJS by Imulus -->
  <script src="<?php 
get_theme_url();
?>
/assets/js/bootstrapValidator.min.js"></script><!-- jQuery Validation -->
  <?php 
if (get_page_slug(FALSE) == 'index') {
    ?>
  <script src="<?php 
    get_theme_url();
    ?>
/assets/js/validationRules.js"></script><!-- Validation Rules -->
  <?php 
}
?>
  
</body>

</html>
示例#11
0
function get_head_meta($name = null)
{
    global $post;
    global $_SITE;
    global $_PAGES;
    if ($name == 'author') {
        return $_SITE['author'];
    }
    if (is_home()) {
        $meta = array('title' => strip_tags(isset($_SITE['title']) ? $_SITE['title'] : get_bloginfo('name')), 'url' => 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'description' => strip_tags(isset($_SITE['description']) ? $_SITE['description'] : get_bloginfo('description')), 'image' => $_SITE['image'], 'site_name' => $_SITE['site_name'], 'type' => 'website');
    } else {
        if (is_single()) {
            $title = get_the_title();
            $desc = get_post_main_desc($post->ID);
            $image = get_post_main_image($post->ID);
            $meta = array('title' => strip_tags((isset($title) ? $title . ' | ' : '') . $_SITE['title']), 'url' => 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'description' => str_replace(array("\r\n", "\n", "\r"), '', strip_tags(isset($desc) ? $desc : $_SITE['description'])), 'image' => isset($image) ? $image : $_SITE['image'], 'site_name' => $_SITE['site_name'], 'type' => 'article');
        } else {
            if ((is_static() or is_page()) and isset($_PAGES[get_page_slug()])) {
                $p = $_PAGES[get_page_slug()];
                $image = !empty($p['image']) ? $p['image'] : $_SITE['image'];
                $desc = !empty($p['description']) ? $p['description'] : $_SITE['description'];
                $meta = array('title' => $p['title'] . ' | ' . $_SITE['title'], 'url' => 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'description' => $desc, 'image' => $image, 'site_name' => $_SITE['site_name'], 'type' => 'article');
            } else {
                if (is_page()) {
                    $title = get_the_title();
                    $desc = get_the_excerpt();
                    $image = get_post_main_image($post->ID);
                    $meta = array('title' => (!empty($title) ? $title . ' | ' : '') . $_SITE['title'], 'url' => 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'description' => !empty($desc) ? $desc : $_SITE['description'], 'image' => isset($image) ? $image : $_SITE['image'], 'site_name' => $_SITE['site_name'], 'type' => 'article');
                } else {
                    if (is_tax()) {
                        $term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));
                        $image = function_exists('get_field') ? get_field('term_thumb', $term) : null;
                        $meta = array('title' => (!empty($term) ? $term->name . ' | ' : '') . $_SITE['title'], 'url' => 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'description' => !empty($term) ? $term->description : $_SITE['description'], 'image' => !empty($image) ? $image['url'] : $_SITE['image'], 'site_name' => $_SITE['site_name'], 'type' => 'article');
                    } else {
                        $meta = array('title' => $_SITE['title'], 'url' => 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'description' => $_SITE['description'], 'image' => $_SITE['image'], 'site_name' => $_SITE['site_name'], 'type' => 'article');
                    }
                }
            }
        }
    }
    $meta = array_merge($_SITE, $meta);
    return isset($name) && isset($meta[$name]) ? $meta[$name] : $meta;
}
示例#12
0
 function __construct($type, $num = -1)
 {
     global $_SINGLE_POSTS;
     global $_CATEGORIES;
     global $post_type;
     if ($_CATEGORIES && $_CATEGORIES[$type]) {
         $post_type = $_CATEGORIES[$type]['post_type'];
         $slug = get_page_slug();
         // $this->posts = array_filter($_SINGLE_POSTS[$post_type], function($p) use ($type, $slug){
         //   if(is_array($p[$type])){
         //     return in_array($slug, $p[$type]);
         //   }else{
         //     return $p[$type] == $slug;
         //   }
         // });
         $this->posts = array();
         foreach ($_SINGLE_POSTS[$post_type] as $i => $p) {
             if (is_array($p[$type]) && in_array($slug, $p[$type]) or $p[$type] == $slug) {
                 $this->posts[] = $p;
             }
         }
     } else {
         $post_type = $type;
         $this->posts = $_SINGLE_POSTS[$type];
     }
     $this->keys = array_keys($this->posts);
     $this->index = 0;
     $this->max = $num == -1 ? count($this->posts) : $num;
 }
示例#13
0
function get_items($content)
{
    $CustomFields = new DisplayImItems();
    $url = strval(get_page_slug(FALSE));
    if ($url == ITEMSLISTPAGE) {
        $CustomFields->getAllItems();
    } else {
        return $content;
    }
}