Use @php() instead of @php [...] @endphp
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
{!! get_search_form(false) !!}
|
||||
@endif
|
||||
|
||||
@while (have_posts()) @php the_post() @endphp
|
||||
@while (have_posts()) @php(the_post())
|
||||
@include ('partials.content-'.(get_post_type() !== 'post' ? get_post_type() : get_post_format()))
|
||||
@endwhile
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<!doctype html>
|
||||
<html @php language_attributes() @endphp>
|
||||
<html @php(language_attributes())>
|
||||
@include('partials.head')
|
||||
<body @php body_class() @endphp>
|
||||
<body @php(body_class())>
|
||||
<!--[if IE]>
|
||||
<div class="alert alert-warning">
|
||||
{!! __('You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.', 'sage') !!}
|
||||
</div>
|
||||
<![endif]-->
|
||||
@php do_action('get_header') @endphp
|
||||
@php(do_action('get_header'))
|
||||
@include('partials.header')
|
||||
<div class="wrap container" role="document">
|
||||
<div class="content row">
|
||||
@@ -21,8 +21,8 @@
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@php do_action('get_footer') @endphp
|
||||
@php(do_action('get_footer'))
|
||||
@include('partials.footer')
|
||||
@php wp_footer() @endphp
|
||||
@php(wp_footer())
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@extends('layouts.base')
|
||||
|
||||
@section('content')
|
||||
@while(have_posts()) @php the_post() @endphp
|
||||
@while(have_posts()) @php(the_post())
|
||||
@include('partials.page-header')
|
||||
@include('partials.content-page')
|
||||
@endwhile
|
||||
|
||||
@@ -18,10 +18,10 @@ if (post_password_required()) {
|
||||
<nav>
|
||||
<ul class="pager">
|
||||
@if (get_previous_comments_link())
|
||||
<li class="previous">{!! previous_comments_link(__('← Older comments', 'sage')) !!}</li>
|
||||
<li class="previous">@php(previous_comments_link(__('← Older comments', 'sage')))</li>
|
||||
@endif
|
||||
@if (get_next_comments_link())
|
||||
<li class="next">{!! next_comments_link(__('Newer comments →', 'sage')) !!}</li>
|
||||
<li class="next">@php(next_comments_link(__('Newer comments →', 'sage')))</li>
|
||||
@endif
|
||||
</ul>
|
||||
</nav>
|
||||
@@ -34,5 +34,5 @@ if (post_password_required()) {
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@php comment_form() @endphp
|
||||
@php(comment_form())
|
||||
</section>
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
@php the_content() @endphp
|
||||
@php(the_content())
|
||||
{!! wp_link_pages(['before' => '<nav class="page-nav"><p>' . __('Pages:', 'sage'), 'after' => '</p></nav>']) !!}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<article @php post_class() @endphp>
|
||||
<article @php(post_class())>
|
||||
<header>
|
||||
<h2 class="entry-title"><a href="{{ get_permalink() }}">{{ get_the_title() }}</a></h2>
|
||||
@if (get_post_type() === 'post')
|
||||
@@ -6,6 +6,6 @@
|
||||
@endif
|
||||
</header>
|
||||
<div class="entry-summary">
|
||||
@php the_excerpt() @endphp
|
||||
@php(the_excerpt())
|
||||
</div>
|
||||
</article>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<article @php post_class() @endphp>
|
||||
<article @php(post_class())>
|
||||
<header>
|
||||
<h1 class="entry-title">{{ get_the_title() }}</h1>
|
||||
@include('partials/entry-meta')
|
||||
</header>
|
||||
<div class="entry-content">
|
||||
@php the_content() @endphp
|
||||
@php(the_content())
|
||||
</div>
|
||||
<footer>
|
||||
{!! wp_link_pages(['before' => '<nav class="page-nav"><p>' . __('Pages:', 'sage'), 'after' => '</p></nav>']) !!}
|
||||
</footer>
|
||||
@php comments_template('/templates/partials/comments.blade.php') @endphp
|
||||
@php(comments_template('/templates/partials/comments.blade.php'))
|
||||
</article>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<article @php post_class() @endphp>
|
||||
<article @php(post_class())>
|
||||
<header>
|
||||
<h2 class="entry-title"><a href="{{ get_permalink() }}">{{ get_the_title() }}</a></h2>
|
||||
@include('partials/entry-meta')
|
||||
</header>
|
||||
<div class="entry-summary">
|
||||
@php the_excerpt() @endphp
|
||||
@php(the_excerpt())
|
||||
</div>
|
||||
</article>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<footer class="content-info">
|
||||
<div class="container">
|
||||
@php dynamic_sidebar('sidebar-footer') @endphp
|
||||
@php(dynamic_sidebar('sidebar-footer'))
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
@php wp_head() @endphp
|
||||
@php(wp_head())
|
||||
</head>
|
||||
|
||||
@@ -1 +1 @@
|
||||
@php dynamic_sidebar('sidebar-primary') @endphp
|
||||
@php(dynamic_sidebar('sidebar-primary'))
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{!! get_search_form(false) !!}
|
||||
@endif
|
||||
|
||||
@while(have_posts()) @php the_post() @endphp
|
||||
@while(have_posts()) @php(the_post())
|
||||
@include('partials.content-search')
|
||||
@endwhile
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@extends('layouts.base')
|
||||
|
||||
@section('content')
|
||||
@while(have_posts()) @php the_post() @endphp
|
||||
@while(have_posts()) @php(the_post())
|
||||
@include('partials/content-single-'.get_post_type())
|
||||
@endwhile
|
||||
@endsection
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
@php
|
||||
/**
|
||||
* Template Name: Custom Template
|
||||
*/
|
||||
@endphp
|
||||
{{--
|
||||
Template Name: Custom Template
|
||||
--}}
|
||||
|
||||
@extends('layouts.base')
|
||||
|
||||
@section('content')
|
||||
@while(have_posts()) @php the_post() @endphp
|
||||
@while(have_posts()) @php(the_post())
|
||||
@include('partials.page-header')
|
||||
@include('partials.content-page')
|
||||
@endwhile
|
||||
|
||||
Reference in New Issue
Block a user