Merge pull request #859 from jrfnl/feature/854-no-unncessary-php-tags
Avoid going in and out of PHP unnecessarily.
This commit is contained in:
commit
193d073b84
12 changed files with 127 additions and 107 deletions
|
@ -15,20 +15,23 @@
|
|||
</header><!-- .page-header -->
|
||||
|
||||
<div class="page-content">
|
||||
<?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
|
||||
<?php
|
||||
if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
|
||||
|
||||
<p><?php printf( wp_kses( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', '_s' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
|
||||
|
||||
<?php elseif ( is_search() ) : ?>
|
||||
|
||||
<p><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', '_s' ); ?></p>
|
||||
<?php get_search_form(); ?>
|
||||
<?php
|
||||
get_search_form();
|
||||
|
||||
<?php else : ?>
|
||||
else : ?>
|
||||
|
||||
<p><?php esc_html_e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', '_s' ); ?></p>
|
||||
<?php get_search_form(); ?>
|
||||
<?php
|
||||
get_search_form();
|
||||
|
||||
<?php endif; ?>
|
||||
endif; ?>
|
||||
</div><!-- .page-content -->
|
||||
</section><!-- .no-results -->
|
||||
|
|
|
@ -15,8 +15,9 @@
|
|||
</header><!-- .entry-header -->
|
||||
|
||||
<div class="entry-content">
|
||||
<?php the_content(); ?>
|
||||
<?php
|
||||
the_content();
|
||||
|
||||
wp_link_pages( array(
|
||||
'before' => '<div class="page-links">' . esc_html__( 'Pages:', '_s' ),
|
||||
'after' => '</div>',
|
||||
|
|
|
@ -19,8 +19,9 @@
|
|||
</header><!-- .entry-header -->
|
||||
|
||||
<div class="entry-content">
|
||||
<?php the_content(); ?>
|
||||
<?php
|
||||
the_content();
|
||||
|
||||
wp_link_pages( array(
|
||||
'before' => '<div class="page-links">' . esc_html__( 'Pages:', '_s' ),
|
||||
'after' => '</div>',
|
||||
|
|
|
@ -11,13 +11,15 @@
|
|||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<header class="entry-header">
|
||||
<?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
|
||||
<?php
|
||||
the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );
|
||||
|
||||
<?php if ( 'post' === get_post_type() ) : ?>
|
||||
if ( 'post' === get_post_type() ) : ?>
|
||||
<div class="entry-meta">
|
||||
<?php _s_posted_on(); ?>
|
||||
</div><!-- .entry-meta -->
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<div class="entry-content">
|
||||
|
@ -27,9 +29,7 @@
|
|||
wp_kses( __( 'Continue reading %s <span class="meta-nav">→</span>', '_s' ), array( 'span' => array( 'class' => array() ) ) ),
|
||||
the_title( '<span class="screen-reader-text">"', '"</span>', false )
|
||||
) );
|
||||
?>
|
||||
|
||||
<?php
|
||||
wp_link_pages( array(
|
||||
'before' => '<div class="page-links">' . esc_html__( 'Pages:', '_s' ),
|
||||
'after' => '</div>',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue