コード例 #1
0
ファイル: 404.php プロジェクト: shubham79/Jhintaak
/**
 * $Desc
 *
 * @version    $Id$
 * @package    wpbase
 * @author     Opal  Team <*****@*****.** >
 * @copyright  Copyright (C) 2014 wpopal.com. All Rights Reserved.
 * @license    GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html
 *
 * @website  http:/wpopal.com
 * @support  http://wpopal.com
 */
?>

<?php 
get_header(get_header_layout());
?>

<section class="container">
	<div class="page_not_found text-center clearfix">
		<h1 class="title-page">
			<?php 
echo __('page not found', TEXTDOMAIN);
?>
		
		</h1>
		<div class="bigtext-error">404</div>
		<div class="col-sm-6 col-sm-offset-3">
			<div class="bigtext">
                <?php 
echo of_get_option('404', 'Can\'t find what you need? Take a moment and do a search below!');
コード例 #2
0
 function create_theme_layout($source = 'default', $template = false, $layout_key = false)
 {
     global $post, $cssPath, $jsPath, $context, $layouts, $theLayout, $theHeader, $theFooter, $theme_data_array, $theme_design_loaded, $is_responsive;
     $theme_design_loaded = true;
     // marks this function has been called already
     // Begin getting together the default data
     //................................................................
     $context = $source;
     // Retrieve the layout information for this page.
     $layouts = get_theme_var('layouts');
     if (!is_array($layouts)) {
         $layouts = 0;
     }
     // Check for a the set layout
     if (!is_array($layouts) || count($layouts) <= 0) {
         echo '<p>' . __('No layouts defined for this theme. Please go to "Appearance &gt; Layouts" and ensure you have page layouts created and default layouts assigned for each post type at the bottom of the page.', THEME_NAME) . '</p>';
         // should be returned using 404 page template...
     } else {
         // get the layout array to use
         $layout_id = $layout_key;
         // default = false;
         $the_context = $context;
         // Check for special cases where the context is overriden for the layout
         if ($context == 'page' && is_front_page()) {
             // this happens when "Front page displays > A static page" is selected and the home page is loaded.
             // we're not setting the variable "$context"  because that would cause a global change. we only want the layout altered.
             $layout_id = false;
             $the_context = 'home';
         } elseif ($context == 'home' && is_home() && get_option('show_on_front') == 'page') {
             // The user has specified a "blog page" under Reading settings, "Front page displays > A static page > Posts page"
             // We need to force the layout to the default "blog" or it will try and use the home page layout.
             $layout_id = false;
             $the_context = 'blog';
         }
         // Get the layout array for this page
         $theLayout = get_theme_layout($layout_id, $the_context);
         // get_theme_layout();
         $theLayout['template'] = $template;
         // set the template file (source file of "Default Content" areas)
         // header settings
         $theHeader = get_header_layout();
         // returns header options for current layout/page
         // logo image
         if ($theHeader['logo']) {
             $theLayout['logo'] = array('img' => $theHeader['logo'], 'w' => $theHeader['logo_width'], 'h' => $theHeader['logo_height']);
         } else {
             $theLayout['logo'] = array('img' => get_theme_var('design_setting,logo'), 'w' => get_theme_var('design_setting,logo_width'), 'h' => get_theme_var('design_setting,logo_height'));
         }
         // Body fonts
         if (get_theme_var('design_setting,fonts,body') == 'custom:standard') {
             $theLayout['body_font'] = prep_content(get_theme_var('design_setting,fonts,body_custom'));
         } else {
             $theLayout['body_font'] = prep_content(str_replace(array('standard:', '|'), array('', ', '), get_theme_var('design_setting,fonts,body')));
         }
         // Heading fonts
         $headingFont = get_theme_var('design_setting,fonts,heading');
         $fontType = substr($headingFont, 0, strpos($headingFont, ':'));
         if ($headingFont == 'custom:standard') {
             // custom standard font
             $theLayout['heading_font']['standard'] = prep_content(get_theme_var('design_setting,fonts,heading_standard'));
         } elseif ($headingFont == 'custom:cufon') {
             // custom cufon font
             $cufonFont = prep_content(get_theme_var('design_setting,fonts,heading_cufon'));
             if (strpos($cufonFont, '/')) {
                 // seems we have a path to a cufon file
                 $theLayout['heading_font']['cufon'] = $cufonFont;
             } else {
                 // just a file name, add the path to our other cufon files
                 $theLayout['heading_font']['cufon'] = $jsPath . 'fonts/' . $cufonFont;
             }
         } else {
             // Pre-set font selected
             if ($fontType == 'standard') {
                 $theLayout['heading_font']['standard'] = prep_content(str_replace(array('standard:', '|'), array('', ', '), $headingFont));
             }
             if ($fontType == 'cufon') {
                 $cufonFont = substr($headingFont, strpos($headingFont, ':') + 1);
                 $theLayout['heading_font']['cufon'] = $jsPath . 'fonts/cufon.' . $cufonFont . '.js';
             }
         }
         // Blog defaults
         $theLayout['blog']['post_date'] = get_theme_var('blog,show_post_date');
         $theLayout['blog']['author_name'] = get_theme_var('blog,show_author_name');
         $theLayout['blog']['author_avatar'] = get_theme_var('blog,show_author_avatar');
         $theLayout['blog']['comments_link'] = get_theme_var('blog,show_comments_link');
         $theLayout['blog']['category_list'] = get_theme_var('blog,show_categories');
         $theLayout['blog']['tag_list'] = get_theme_var('blog,show_tags');
         $theLayout['blog']['image']['width'] = (int) get_theme_var('blog,post_image_width', 153);
         // image width
         $theLayout['blog']['image']['height'] = (int) get_theme_var('blog,post_image_height', 153);
         // image height
         $theLayout['blog']['use_excerpt'] = get_theme_var('blog,use_post_excerpt');
         $theLayout['blog']['excerpt_length'] = (int) get_theme_var('blog,excerpt_length', 50);
         // length of excerpt
         $theLayout['blog']['read_more'] = get_theme_var('blog,read_more_text');
         // optional "Read more..." link
         $theLayout['blog']['style'] = (int) get_theme_var('blog,style');
         // the default template
         $theLayout['blog']['blog_featured_images'] = get_theme_var('blog,blog_show_image') ? 1 : 0;
         $theLayout['blog']['post_featured_images'] = get_theme_var('blog,post_show_image') ? 1 : 0;
         $theLayout['blog']['paging'] = true;
         // just a default for shortcode purposes
         // footer settings
         $theFooter = get_footer_layout();
         // returns footer options for current layout/page
         $theFooter['top'] = prep_content($theFooter['content_top'], 1, 1);
         // ($content, $allowHTML, $allowShortcodes)
         $theFooter['bottom'] = prep_content($theFooter['content_bottom'], 1, 1);
         // Check if responsive design is enabled
         $is_responsive = get_theme_var('options,responsive', 'active') !== 'inactive' ? true : false;
         // GENERATE THEME OUTPUT
         // Include master design file.
         //................................................................
         // This contains the main structure or outline of the design.
         // Supports context specific design files "design-home.php", if it
         // doesn't exist the template falls back to "design.php" (default)
         //................................................................
         $designTemplate = array('design-' . $the_context . '.php', 'design.php');
         locate_template($designTemplate, true, true);
         // Updated to use "locate_template" so the 'require once' option can be used. This prevents the design template from being loaded multiple times
     }
 }