CS: fix up embedded PHP inconsistencies introduced in the mean time.

This commit is contained in:
jrfnl 2018-02-27 11:18:50 +01:00
parent b26b6ebfa4
commit ec877e48c3
6 changed files with 30 additions and 29 deletions

View File

@ -22,9 +22,9 @@ get_header();
<p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', '_s' ); ?></p> <p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', '_s' ); ?></p>
<?php <?php
get_search_form(); get_search_form();
the_widget( 'WP_Widget_Recent_Posts' ); the_widget( 'WP_Widget_Recent_Posts' );
?> ?>
<div class="widget widget_categories"> <div class="widget widget_categories">

View File

@ -57,9 +57,9 @@ if ( ! function_exists( '_s_header_style' ) ) :
position: absolute; position: absolute;
clip: rect(1px, 1px, 1px, 1px); clip: rect(1px, 1px, 1px, 1px);
} }
<?php <?php
// If the user has set a custom color for the text use that. // If the user has set a custom color for the text use that.
else : else :
?> ?>
.site-title a, .site-title a,
.site-description { .site-description {

View File

@ -124,24 +124,25 @@ function _s_post_thumbnail() {
} }
if ( is_singular() ) : if ( is_singular() ) :
?> ?>
<div class="post-thumbnail"> <div class="post-thumbnail">
<?php the_post_thumbnail(); ?> <?php the_post_thumbnail(); ?>
</div><!-- .post-thumbnail --> </div><!-- .post-thumbnail -->
<?php else : ?> <?php else : ?>
<a class="post-thumbnail" href="<?php the_permalink(); ?>" aria-hidden="true"> <a class="post-thumbnail" href="<?php the_permalink(); ?>" aria-hidden="true">
<?php <?php
the_post_thumbnail( 'post-thumbnail', array( the_post_thumbnail( 'post-thumbnail', array(
'alt' => the_title_attribute( array( 'alt' => the_title_attribute( array(
'echo' => false, 'echo' => false,
) ), ) ),
) ); ) );
?> ?>
</a> </a>
<?php endif; // End is_singular(). <?php
endif; // End is_singular().
} }
endif; endif;

View File

@ -161,7 +161,7 @@ if ( ! function_exists( '_s_woocommerce_wrapper_before' ) ) {
?> ?>
<div id="primary" class="content-area"> <div id="primary" class="content-area">
<main id="main" class="site-main" role="main"> <main id="main" class="site-main" role="main">
<?php <?php
} }
} }
add_action( 'woocommerce_before_main_content', '_s_woocommerce_wrapper_before' ); add_action( 'woocommerce_before_main_content', '_s_woocommerce_wrapper_before' );
@ -175,7 +175,7 @@ if ( ! function_exists( '_s_woocommerce_wrapper_after' ) ) {
* @return void * @return void
*/ */
function _s_woocommerce_wrapper_after() { function _s_woocommerce_wrapper_after() {
?> ?>
</main><!-- #main --> </main><!-- #main -->
</div><!-- #primary --> </div><!-- #primary -->
<?php <?php
@ -224,10 +224,10 @@ if ( ! function_exists( '_s_woocommerce_cart_link' ) ) {
*/ */
function _s_woocommerce_cart_link() { function _s_woocommerce_cart_link() {
?> ?>
<a class="cart-contents" href="<?php echo esc_url( wc_get_cart_url() ); ?>" title="<?php esc_attr_e( 'View your shopping cart', '_s' ); ?>"> <a class="cart-contents" href="<?php echo esc_url( wc_get_cart_url() ); ?>" title="<?php esc_attr_e( 'View your shopping cart', '_s' ); ?>">
<?php /* translators: number of items in the mini cart. */ ?> <?php /* translators: number of items in the mini cart. */ ?>
<span class="amount"><?php echo wp_kses_data( WC()->cart->get_cart_subtotal() ); ?></span> <span class="count"><?php echo wp_kses_data( sprintf( _n( '%d item', '%d items', WC()->cart->get_cart_contents_count(), '_s' ), WC()->cart->get_cart_contents_count() ) );?></span> <span class="amount"><?php echo wp_kses_data( WC()->cart->get_cart_subtotal() ); ?></span> <span class="count"><?php echo wp_kses_data( sprintf( _n( '%d item', '%d items', WC()->cart->get_cart_contents_count(), '_s' ), WC()->cart->get_cart_contents_count() ) ); ?></span>
</a> </a>
<?php <?php
} }
} }
@ -251,11 +251,11 @@ if ( ! function_exists( '_s_woocommerce_header_cart' ) ) {
</li> </li>
<li> <li>
<?php <?php
$instance = array( $instance = array(
'title' => '', 'title' => '',
); );
the_widget( 'WC_Widget_Cart', $instance ); the_widget( 'WC_Widget_Cart', $instance );
?> ?>
</li> </li>
</ul> </ul>

View File

@ -16,8 +16,8 @@
<?php if ( 'post' === get_post_type() ) : ?> <?php if ( 'post' === get_post_type() ) : ?>
<div class="entry-meta"> <div class="entry-meta">
<?php <?php
_s_posted_on(); _s_posted_on();
_s_posted_by(); _s_posted_by();
?> ?>
</div><!-- .entry-meta --> </div><!-- .entry-meta -->
<?php endif; ?> <?php endif; ?>

View File

@ -21,10 +21,10 @@
if ( 'post' === get_post_type() ) : if ( 'post' === get_post_type() ) :
?> ?>
<div class="entry-meta"> <div class="entry-meta">
<?php <?php
_s_posted_on(); _s_posted_on();
_s_posted_by(); _s_posted_by();
?> ?>
</div><!-- .entry-meta --> </div><!-- .entry-meta -->
<?php endif; ?> <?php endif; ?>
</header><!-- .entry-header --> </header><!-- .entry-header -->