CS: Fix code layout of nested function calls with associative arrays.

This commit is contained in:
jrfnl 2017-04-03 00:38:36 +02:00
parent 8cefd8f258
commit a65be48368
4 changed files with 41 additions and 7 deletions

View File

@ -42,7 +42,12 @@
<nav id="site-navigation" class="main-navigation" role="navigation"> <nav id="site-navigation" class="main-navigation" role="navigation">
<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><?php esc_html_e( 'Primary Menu', '_s' ); ?></button> <button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><?php esc_html_e( 'Primary Menu', '_s' ); ?></button>
<?php wp_nav_menu( array( 'theme_location' => 'menu-1', 'menu_id' => 'primary-menu' ) ); ?> <?php
wp_nav_menu( array(
'theme_location' => 'menu-1',
'menu_id' => 'primary-menu',
) );
?>
</nav><!-- #site-navigation --> </nav><!-- #site-navigation -->
</header><!-- #masthead --> </header><!-- #masthead -->

View File

@ -65,8 +65,20 @@ function _s_entry_footer() {
if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
echo '<span class="comments-link">'; echo '<span class="comments-link">';
/* translators: %s: post title */ comments_popup_link(
comments_popup_link( sprintf( wp_kses( __( 'Leave a Comment<span class="screen-reader-text"> on %s</span>', '_s' ), array( 'span' => array( 'class' => array() ) ) ), get_the_title() ) ); sprintf(
wp_kses(
/* translators: %s: post title */
__( 'Leave a Comment<span class="screen-reader-text"> on %s</span>', '_s' ),
array(
'span' => array(
'class' => array(),
),
)
),
get_the_title()
)
);
echo '</span>'; echo '</span>';
} }

View File

@ -19,8 +19,18 @@
if ( is_home() && current_user_can( 'publish_posts' ) ) : ?> if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
<p><?php <p><?php
/* translators: 1: link to WP admin new post page. */ printf(
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' ) ) ); wp_kses(
/* translators: 1: link to WP admin new post page. */
__( '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> ?></p>
<?php elseif ( is_search() ) : ?> <?php elseif ( is_search() ) : ?>

View File

@ -29,8 +29,15 @@
<div class="entry-content"> <div class="entry-content">
<?php <?php
the_content( sprintf( the_content( sprintf(
/* translators: %s: Name of current post. */ wp_kses(
wp_kses( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', '_s' ), array( 'span' => array( 'class' => array() ) ) ), /* translators: %s: Name of current post. */
__( 'Continue reading %s <span class="meta-nav">&rarr;</span>', '_s' ),
array(
'span' => array(
'class' => array(),
),
)
),
the_title( '<span class="screen-reader-text">"', '"</span>', false ) the_title( '<span class="screen-reader-text">"', '"</span>', false )
) ); ) );