Remove template_part, template_sidebar, temp sidebar fix
This commit is contained in:
@@ -15,24 +15,6 @@ function template_unwrap($slug = '', $context = []) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array $context
|
|
||||||
*/
|
|
||||||
function template_sidebar($context = []) {
|
|
||||||
template_part('sidebar', $context);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param $template
|
|
||||||
* @param array $context
|
|
||||||
*/
|
|
||||||
function template_part($template, $context = []) {
|
|
||||||
if ($file = (new Template($template, $context))->locate()) {
|
|
||||||
/** @noinspection PhpIncludeInspection */
|
|
||||||
include $file;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $filename
|
* @param $filename
|
||||||
* @return string
|
* @return string
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php App\template_part('partials/page-header'); ?>
|
<?php get_template_part('partials/page-header'); ?>
|
||||||
|
|
||||||
<div class="alert alert-warning">
|
<div class="alert alert-warning">
|
||||||
<?php _e('Sorry, but the page you were trying to view does not exist.', 'sage'); ?>
|
<?php _e('Sorry, but the page you were trying to view does not exist.', 'sage'); ?>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php App\template_part('partials/page-header'); ?>
|
<?php get_template_part('partials/page-header'); ?>
|
||||||
|
|
||||||
<?php if (!have_posts()) : ?>
|
<?php if (!have_posts()) : ?>
|
||||||
<div class="alert alert-warning">
|
<div class="alert alert-warning">
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php while (have_posts()) : the_post(); ?>
|
<?php while (have_posts()) : the_post(); ?>
|
||||||
<?php App\template_part('partials/content-' . (get_post_type() != 'post' ? get_post_type() : get_post_format())); ?>
|
<?php get_template_part('partials/content', get_post_type() != 'post' ? get_post_type() : get_post_format()); ?>
|
||||||
<?php endwhile; ?>
|
<?php endwhile; ?>
|
||||||
|
|
||||||
<?php the_posts_navigation(); ?>
|
<?php the_posts_navigation(); ?>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html <?php language_attributes(); ?>>
|
<html <?php language_attributes(); ?>>
|
||||||
<?php App\template_part('partials/head'); ?>
|
<?php get_template_part('partials/head'); ?>
|
||||||
<body <?php body_class(); ?>>
|
<body <?php body_class(); ?>>
|
||||||
<!--[if IE]>
|
<!--[if IE]>
|
||||||
<div class="alert alert-warning">
|
<div class="alert alert-warning">
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
<![endif]-->
|
<![endif]-->
|
||||||
<?php
|
<?php
|
||||||
do_action('get_header');
|
do_action('get_header');
|
||||||
App\template_part('partials/header');
|
get_template_part('partials/header');
|
||||||
?>
|
?>
|
||||||
<div class="wrap container" role="document">
|
<div class="wrap container" role="document">
|
||||||
<div class="content row">
|
<div class="content row">
|
||||||
@@ -18,14 +18,14 @@
|
|||||||
</main><!-- /.main -->
|
</main><!-- /.main -->
|
||||||
<?php if (App\display_sidebar()) : ?>
|
<?php if (App\display_sidebar()) : ?>
|
||||||
<aside class="sidebar">
|
<aside class="sidebar">
|
||||||
<?php App\template_sidebar(); ?>
|
<?php get_template_part('partials/sidebar'); ?>
|
||||||
</aside><!-- /.sidebar -->
|
</aside><!-- /.sidebar -->
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div><!-- /.content -->
|
</div><!-- /.content -->
|
||||||
</div><!-- /.wrap -->
|
</div><!-- /.wrap -->
|
||||||
<?php
|
<?php
|
||||||
do_action('get_footer');
|
do_action('get_footer');
|
||||||
App\template_part('partials/footer');
|
get_template_part('partials/footer');
|
||||||
wp_footer();
|
wp_footer();
|
||||||
?>
|
?>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php while (have_posts()) : the_post(); ?>
|
<?php while (have_posts()) : the_post(); ?>
|
||||||
<?php App\template_part('partials/page-header'); ?>
|
<?php get_template_part('partials/page-header'); ?>
|
||||||
<?php App\template_part('partials/content-page'); ?>
|
<?php get_template_part('partials/content-page'); ?>
|
||||||
<?php endwhile; ?>
|
<?php endwhile; ?>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<article <?php post_class(); ?>>
|
<article <?php post_class(); ?>>
|
||||||
<header>
|
<header>
|
||||||
<h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
|
<h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
|
||||||
<?php if (get_post_type() === 'post') { App\template_part('partials/entry-meta'); } ?>
|
<?php if (get_post_type() === 'post') { get_template_part('partials/entry-meta'); } ?>
|
||||||
</header>
|
</header>
|
||||||
<div class="entry-summary">
|
<div class="entry-summary">
|
||||||
<?php the_excerpt(); ?>
|
<?php the_excerpt(); ?>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<article <?php post_class(); ?>>
|
<article <?php post_class(); ?>>
|
||||||
<header>
|
<header>
|
||||||
<h1 class="entry-title"><?php the_title(); ?></h1>
|
<h1 class="entry-title"><?php the_title(); ?></h1>
|
||||||
<?php App\template_part('partials/entry-meta'); ?>
|
<?php get_template_part('partials/entry-meta'); ?>
|
||||||
</header>
|
</header>
|
||||||
<div class="entry-content">
|
<div class="entry-content">
|
||||||
<?php the_content(); ?>
|
<?php the_content(); ?>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<article <?php post_class(); ?>>
|
<article <?php post_class(); ?>>
|
||||||
<header>
|
<header>
|
||||||
<h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
|
<h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
|
||||||
<?php App\template_part('partials/entry-meta'); ?>
|
<?php get_template_part('partials/entry-meta'); ?>
|
||||||
</header>
|
</header>
|
||||||
<div class="entry-summary">
|
<div class="entry-summary">
|
||||||
<?php the_excerpt(); ?>
|
<?php the_excerpt(); ?>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php App\template_part('partials/header-page'); ?>
|
<?php get_template_part('partials/header-page'); ?>
|
||||||
|
|
||||||
<?php if (!have_posts()) : ?>
|
<?php if (!have_posts()) : ?>
|
||||||
<div class="alert alert-warning">
|
<div class="alert alert-warning">
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php while (have_posts()) : the_post(); ?>
|
<?php while (have_posts()) : the_post(); ?>
|
||||||
<?php App\template_part('partials/content-search'); ?>
|
<?php get_template_part('partials/content-search'); ?>
|
||||||
<?php endwhile; ?>
|
<?php endwhile; ?>
|
||||||
|
|
||||||
<?php the_posts_navigation(); ?>
|
<?php the_posts_navigation(); ?>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<?php App\template_part('partials/content-single-' . get_post_type()); ?>
|
<?php get_template_part('partials/content-single-' . get_post_type()); ?>
|
||||||
|
|||||||
@@ -5,6 +5,6 @@
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<?php while (have_posts()) : the_post(); ?>
|
<?php while (have_posts()) : the_post(); ?>
|
||||||
<?php App\template_part('partials/page-header'); ?>
|
<?php get_template_part('partials/page-header'); ?>
|
||||||
<?php App\template_part('partials/content-page'); ?>
|
<?php get_template_part('partials/content-page'); ?>
|
||||||
<?php endwhile; ?>
|
<?php endwhile; ?>
|
||||||
|
|||||||
Reference in New Issue
Block a user