Coding Standards: Upgrade WPCS to 1.2.1.

This upgrade fixes quite a few false positives, as well as auto-fixing some indenting issues.

Fixes #45956.


Built from https://develop.svn.wordpress.org/trunk@44574


git-svn-id: http://core.svn.wordpress.org/trunk@44405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2019-01-12 06:41:52 +00:00
parent 8656a65e1e
commit 7a617078fa
43 changed files with 222 additions and 222 deletions

View File

@ -135,10 +135,10 @@ get_header( 'wp-activate' );
</form>
<?php
} else {
if ( is_wp_error( $result ) && in_array( $result->get_error_code(), $valid_error_codes ) ) {
$signup = $result->get_error_data();
?>
} else {
if ( is_wp_error( $result ) && in_array( $result->get_error_code(), $valid_error_codes ) ) {
$signup = $result->get_error_data();
?>
<h2><?php _e( 'Your account is now active!' ); ?></h2>
<?php
echo '<p class="lead-in">';
@ -162,17 +162,17 @@ get_header( 'wp-activate' );
);
}
echo '</p>';
} elseif ( $result === null || is_wp_error( $result ) ) {
?>
} elseif ( $result === null || is_wp_error( $result ) ) {
?>
<h2><?php _e( 'An error occurred during the activation' ); ?></h2>
<?php if ( is_wp_error( $result ) ) : ?>
<p><?php echo $result->get_error_message(); ?></p>
<?php endif; ?>
<?php
} else {
$url = isset( $result['blog_id'] ) ? get_home_url( (int) $result['blog_id'] ) : '';
$user = get_userdata( (int) $result['user_id'] );
?>
} else {
$url = isset( $result['blog_id'] ) ? get_home_url( (int) $result['blog_id'] ) : '';
$user = get_userdata( (int) $result['user_id'] );
?>
<h2><?php _e( 'Your account is now active!' ); ?></h2>
<div id="signup-welcome">
@ -199,11 +199,11 @@ get_header( 'wp-activate' );
printf( __( 'Your account is now activated. <a href="%1$s">Log in</a> or go back to the <a href="%2$s">homepage</a>.' ), network_site_url( 'wp-login.php', 'login' ), network_home_url() );
?>
</p>
<?php
endif;
<?php
endif;
}
}
}
?>
?>
</div>
</div>
<script type="text/javascript">

View File

@ -642,43 +642,43 @@ class Custom_Image_Header {
</tr>
<?php
endif;
if ( ! empty( $this->default_headers ) ) :
?>
if ( ! empty( $this->default_headers ) ) :
?>
<tr>
<th scope="row"><?php _e( 'Default Images' ); ?></th>
<td>
<?php if ( current_theme_supports( 'custom-header', 'uploads' ) ) : ?>
<?php if ( current_theme_supports( 'custom-header', 'uploads' ) ) : ?>
<p><?php _e( 'If you don&lsquo;t want to upload your own image, you can use one of these cool headers, or show a random one.' ); ?></p>
<?php else : ?>
<p><?php _e( 'You can use one of these cool headers or show a random one on each page.' ); ?></p>
<?php endif; ?>
<?php
$this->show_header_selector( 'default' );
?>
<?php
$this->show_header_selector( 'default' );
?>
</td>
</tr>
<?php
<?php
endif;
if ( get_header_image() ) :
?>
if ( get_header_image() ) :
?>
<tr>
<th scope="row"><?php _e( 'Remove Image' ); ?></th>
<td>
<p><?php _e( 'This will remove the header image. You will not be able to restore any customizations.' ); ?></p>
<?php submit_button( __( 'Remove Header Image' ), '', 'removeheader', false ); ?>
<?php submit_button( __( 'Remove Header Image' ), '', 'removeheader', false ); ?>
</td>
</tr>
<?php
<?php
endif;
$default_image = sprintf( get_theme_support( 'custom-header', 'default-image' ), get_template_directory_uri(), get_stylesheet_directory_uri() );
if ( $default_image && get_header_image() != $default_image ) :
?>
$default_image = sprintf( get_theme_support( 'custom-header', 'default-image' ), get_template_directory_uri(), get_stylesheet_directory_uri() );
if ( $default_image && get_header_image() != $default_image ) :
?>
<tr>
<th scope="row"><?php _e( 'Reset Image' ); ?></th>
<td>
<p><?php _e( 'This will restore the original header image. You will not be able to restore any customizations.' ); ?></p>
<?php submit_button( __( 'Restore Original Header Image' ), '', 'resetheader', false ); ?>
<?php submit_button( __( 'Restore Original Header Image' ), '', 'resetheader', false ); ?>
</td>
</tr>
<?php endif; ?>
@ -741,7 +741,7 @@ endif;
do_action( 'custom_header_options' );
wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' );
?>
?>
<?php submit_button( null, 'primary', 'save-header-options' ); ?>
</form>

View File

@ -1218,7 +1218,7 @@ class WP_List_Table {
endif;
$this->extra_tablenav( $which );
$this->pagination( $which );
?>
?>
<br class="clear" />
</div>

View File

@ -280,7 +280,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
<?php } else { ?>
<div class="no-plugin-results"><?php _e( 'No plugins found. Try a different search.' ); ?></div>
<?php
}
}
}
/**
@ -392,7 +392,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
<br class="clear" />
</div>
<?php
}
}
}
/**

View File

@ -1471,14 +1471,14 @@ class WP_Posts_List_Table extends WP_List_Table {
<span class="input-text-wrap"><input type="text" name="post_title" class="ptitle" value="" /></span>
</label>
<?php if ( is_post_type_viewable( $screen->post_type ) ) : // is_post_type_viewable check ?>
<?php if ( is_post_type_viewable( $screen->post_type ) ) : // is_post_type_viewable check ?>
<label>
<span class="title"><?php _e( 'Slug' ); ?></span>
<span class="input-text-wrap"><input type="text" name="post_name" value="" /></span>
</label>
<?php
<?php
endif; // is_post_type_viewable check
endif; // $bulk
endif; // post_type_supports title
@ -1493,39 +1493,39 @@ class WP_Posts_List_Table extends WP_List_Table {
<?php
endif; // $bulk
if ( post_type_supports( $screen->post_type, 'author' ) ) :
$authors_dropdown = '';
if ( post_type_supports( $screen->post_type, 'author' ) ) :
$authors_dropdown = '';
if ( current_user_can( $post_type_object->cap->edit_others_posts ) ) :
$users_opt = array(
'hide_if_only_one_author' => false,
'who' => 'authors',
'name' => 'post_author',
'class' => 'authors',
'multi' => 1,
'echo' => 0,
'show' => 'display_name_with_login',
);
if ( $bulk ) {
$users_opt['show_option_none'] = __( '&mdash; No Change &mdash;' );
}
if ( current_user_can( $post_type_object->cap->edit_others_posts ) ) :
$users_opt = array(
'hide_if_only_one_author' => false,
'who' => 'authors',
'name' => 'post_author',
'class' => 'authors',
'multi' => 1,
'echo' => 0,
'show' => 'display_name_with_login',
);
if ( $bulk ) {
$users_opt['show_option_none'] = __( '&mdash; No Change &mdash;' );
}
if ( $authors = wp_dropdown_users( $users_opt ) ) :
$authors_dropdown = '<label class="inline-edit-author">';
$authors_dropdown .= '<span class="title">' . __( 'Author' ) . '</span>';
$authors_dropdown .= $authors;
$authors_dropdown .= '</label>';
endif;
endif; // authors
?>
if ( $authors = wp_dropdown_users( $users_opt ) ) :
$authors_dropdown = '<label class="inline-edit-author">';
$authors_dropdown .= '<span class="title">' . __( 'Author' ) . '</span>';
$authors_dropdown .= $authors;
$authors_dropdown .= '</label>';
endif;
endif; // authors
?>
<?php
if ( ! $bulk ) {
echo $authors_dropdown;}
<?php
if ( ! $bulk ) {
echo $authors_dropdown;}
endif; // post_type_supports author
if ( ! $bulk && $can_publish ) :
?>
if ( ! $bulk && $can_publish ) :
?>
<div class="inline-edit-group wp-clearfix">
<label class="alignleft">
@ -1545,7 +1545,7 @@ if ( ! $bulk && $can_publish ) :
</label>
</div>
<?php endif; ?>
<?php endif; ?>
</div></fieldset>
@ -1690,7 +1690,7 @@ if ( ! $bulk && $can_publish ) :
<?php else : // $bulk ?>
<div class="inline-edit-group wp-clearfix">
<?php if ( post_type_supports( $screen->post_type, 'comments' ) ) : ?>
<?php if ( post_type_supports( $screen->post_type, 'comments' ) ) : ?>
<label class="alignleft">
<input type="checkbox" name="comment_status" value="open" />
<span class="checkbox-title"><?php _e( 'Allow Comments' ); ?></span>
@ -1703,7 +1703,7 @@ if ( ! $bulk && $can_publish ) :
<?php endif; ?>
</div>
<?php
<?php
endif; // $bulk
endif; // post_type_supports comments or pings
?>

View File

@ -918,8 +918,8 @@ final class WP_Screen {
</div>
<?php
endif;
if ( $this->show_screen_options() ) :
?>
if ( $this->show_screen_options() ) :
?>
<div id="screen-options-link-wrap" class="hide-if-no-js screen-meta-toggle">
<button type="button" id="show-settings-link" class="button show-settings" aria-controls="screen-options-wrap" aria-expanded="false"><?php _e( 'Screen Options' ); ?></button>
</div>

View File

@ -286,7 +286,7 @@ class WP_Users_List_Table extends WP_List_Table {
* @param string $which The location of the extra table nav markup: 'top' or 'bottom'.
*/
do_action( 'restrict_manage_users', $which );
?>
?>
</div>
<?php
/**

View File

@ -318,7 +318,7 @@ endif;
<?php else : ?>
<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( 'Publish' ); ?>" />
<?php submit_button( __( 'Publish' ), 'primary large', 'publish', false ); ?>
<?php
<?php
endif;
else :
?>

View File

@ -998,11 +998,11 @@ function confirm_delete_users( $users ) {
<p><?php _e( 'Once you hit &#8220;Confirm Deletion&#8221;, the user will be permanently removed.' ); ?></p>
<?php else : ?>
<p><?php _e( 'Once you hit &#8220;Confirm Deletion&#8221;, these users will be permanently removed.' ); ?></p>
<?php
<?php
endif;
submit_button( __( 'Confirm Deletion' ), 'primary' );
?>
?>
</form>
<?php
return true;

View File

@ -696,10 +696,10 @@ function install_plugin_information() {
?>
<p aria-hidden="true" class="fyi-description"><?php printf( _n( '(based on %s rating)', '(based on %s ratings)', $api->num_ratings ), number_format_i18n( $api->num_ratings ) ); ?></p>
<?php
}
}
if ( ! empty( $api->ratings ) && array_sum( (array) $api->ratings ) > 0 ) {
?>
if ( ! empty( $api->ratings ) && array_sum( (array) $api->ratings ) > 0 ) {
?>
<h3><?php _e( 'Reviews' ); ?></h3>
<p class="fyi-description"><?php _e( 'Read all reviews on WordPress.org or write your own!' ); ?></p>
<?php
@ -727,9 +727,9 @@ if ( ! empty( $api->ratings ) && array_sum( (array) $api->ratings ) > 0 ) {
</div>
<?php
}
}
if ( ! empty( $api->contributors ) ) {
?>
}
if ( ! empty( $api->contributors ) ) {
?>
<h3><?php _e( 'Contributors' ); ?></h3>
<ul class="contributors">
<?php
@ -747,10 +747,10 @@ if ( ! empty( $api->contributors ) ) {
}
?>
</ul>
<?php if ( ! empty( $api->donate_link ) ) { ?>
<?php if ( ! empty( $api->donate_link ) ) { ?>
<a target="_blank" href="<?php echo esc_url( $api->donate_link ); ?>"><?php _e( 'Donate to this plugin &#187;' ); ?></a>
<?php } ?>
<?php } ?>
<?php } ?>
</div>
<div id="section-holder" class="wrap">
<?php

View File

@ -1732,16 +1732,16 @@ function _admin_notice_post_locked() {
<?php if ( $preview_link ) { ?>
<a class="button<?php echo $tab_last; ?>" href="<?php echo esc_url( $preview_link ); ?>"><?php _e( 'Preview' ); ?></a>
<?php
}
}
// Allow plugins to prevent some users overriding the post lock
if ( $override ) {
?>
if ( $override ) {
?>
<a class="button button-primary wp-tab-last" href="<?php echo esc_url( add_query_arg( 'get-post-lock', '1', wp_nonce_url( get_edit_post_link( $post->ID, 'url' ), 'lock-post_' . $post->ID ) ) ); ?>"><?php _e( 'Take over' ); ?></a>
<?php
}
}
?>
?>
</p>
</div>
<?php

View File

@ -822,14 +822,14 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
<span class="screen-reader-text"><?php _e( 'Click the Save Menu button to save your changes.' ); ?></span>
</span><!-- /add-new-menu-action -->
</form>
<?php
<?php
endif;
$metabox_holder_disabled_class = '';
if ( isset( $_GET['menu'] ) && '0' == $_GET['menu'] ) {
$metabox_holder_disabled_class = ' metabox-holder-disabled';
}
?>
if ( isset( $_GET['menu'] ) && '0' == $_GET['menu'] ) {
$metabox_holder_disabled_class = ' metabox-holder-disabled';
}
?>
</div><!-- /manage-menus -->
<div id="nav-menus-frame" class="wp-clearfix">
<div id="menu-settings-column" class="metabox-holder<?php echo $metabox_holder_disabled_class; ?>">
@ -914,10 +914,10 @@ if ( isset( $_GET['menu'] ) && '0' == $_GET['menu'] ) {
endif;
$no_menus_style = '';
if ( $one_theme_location_no_menus ) {
$no_menus_style = 'style="display: none;"';
}
?>
if ( $one_theme_location_no_menus ) {
$no_menus_style = 'style="display: none;"';
}
?>
<div class="menu-settings" <?php echo $no_menus_style; ?>>
<h3><?php _e( 'Menu Settings' ); ?></h3>
<?php

View File

@ -231,14 +231,14 @@ printf(
<?php if ( is_subdomain_install() ) { ?>
<input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off" required /><span class="no-break">.<?php echo preg_replace( '|^www\.|', '', get_network()->domain ); ?></span>
<?php
} else {
echo get_network()->domain . get_network()->path
?>
} else {
echo get_network()->domain . get_network()->path
?>
<input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off" required />
<?php
}
<?php
}
echo '<p class="description" id="site-address-desc">' . __( 'Only lowercase letters (a-z), numbers, and hyphens are allowed.' ) . '</p>';
?>
?>
</td>
</tr>
<tr class="form-field form-required">

View File

@ -349,28 +349,28 @@ printf( __( 'If you like, you may enter custom structures for your category and
</p>
<?php else : ?>
<p>
<?php
printf(
/* translators: 1: Codex URL, 2: web.config, 3: CTRL + a */
__( 'If the root directory of your site was <a href="%1$s">writable</a>, we could do this automatically, but it isn&#8217;t so this is the url rewrite rule you should have in your %2$s file. Create a new file, called %2$s in the root directory of your site. Click in the field and press %3$s to select all. Then insert this code into the %2$s file.' ),
__( 'https://codex.wordpress.org/Changing_File_Permissions' ),
'<code>web.config</code>',
'<kbd>CTRL + a</kbd>'
);
?>
<?php
printf(
/* translators: 1: Codex URL, 2: web.config, 3: CTRL + a */
__( 'If the root directory of your site was <a href="%1$s">writable</a>, we could do this automatically, but it isn&#8217;t so this is the url rewrite rule you should have in your %2$s file. Create a new file, called %2$s in the root directory of your site. Click in the field and press %3$s to select all. Then insert this code into the %2$s file.' ),
__( 'https://codex.wordpress.org/Changing_File_Permissions' ),
'<code>web.config</code>',
'<kbd>CTRL + a</kbd>'
);
?>
</p>
<form action="options-permalink.php" method="post">
<?php wp_nonce_field( 'update-permalink' ); ?>
<?php wp_nonce_field( 'update-permalink' ); ?>
<p><textarea rows="18" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->iis7_url_rewrite_rules( true ) ); ?></textarea></p>
</form>
<p>
<?php
printf(
/* translators: %s: web.config */
__( 'If you temporarily make your site&#8217;s root directory writable for us to generate the %s file automatically, do not forget to revert the permissions after the file has been created.' ),
'<code>web.config</code>'
);
?>
<?php
printf(
/* translators: %s: web.config */
__( 'If you temporarily make your site&#8217;s root directory writable for us to generate the %s file automatically, do not forget to revert the permissions after the file has been created.' ),
'<code>web.config</code>'
);
?>
</p>
<?php endif; ?>
<?php endif; ?>

View File

@ -228,7 +228,7 @@ switch ( $action ) {
<?php } elseif ( is_multisite() && current_user_can( 'promote_users' ) ) { ?>
<a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a>
<?php
}
}
}
?>
@ -304,13 +304,13 @@ switch ( $action ) {
</tr>
<?php
endif; // $_wp_admin_css_colors
if ( ! ( IS_PROFILE_PAGE && ! $user_can_edit ) ) :
?>
if ( ! ( IS_PROFILE_PAGE && ! $user_can_edit ) ) :
?>
<tr class="user-comment-shortcuts-wrap">
<th scope="row"><?php _e( 'Keyboard Shortcuts' ); ?></th>
<td><label for="comment_shortcuts"><input type="checkbox" name="comment_shortcuts" id="comment_shortcuts" value="true" <?php checked( 'true', $profileuser->comment_shortcuts ); ?> /> <?php _e( 'Enable keyboard shortcuts for comment moderation.' ); ?></label> <?php _e( '<a href="https://codex.wordpress.org/Keyboard_Shortcuts" target="_blank">More information</a>' ); ?></td>
</tr>
<?php endif; ?>
<?php endif; ?>
<tr class="show-admin-bar user-admin-bar-front-wrap">
<th scope="row"><?php _e( 'Toolbar' ); ?></th>
<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Toolbar' ); ?></span></legend>
@ -414,17 +414,17 @@ endif;
<?php
endif; //!IS_PROFILE_PAGE
if ( is_multisite() && is_network_admin() && ! IS_PROFILE_PAGE && current_user_can( 'manage_network_options' ) && ! isset( $super_admins ) ) {
?>
if ( is_multisite() && is_network_admin() && ! IS_PROFILE_PAGE && current_user_can( 'manage_network_options' ) && ! isset( $super_admins ) ) {
?>
<tr class="user-super-admin-wrap"><th><?php _e( 'Super Admin' ); ?></th>
<td>
<?php if ( $profileuser->user_email != get_site_option( 'admin_email' ) || ! is_super_admin( $profileuser->ID ) ) : ?>
<?php if ( $profileuser->user_email != get_site_option( 'admin_email' ) || ! is_super_admin( $profileuser->ID ) ) : ?>
<p><label><input type="checkbox" id="super_admin" name="super_admin"<?php checked( is_super_admin( $profileuser->ID ) ); ?> /> <?php _e( 'Grant this user super admin privileges for the Network.' ); ?></label></p>
<?php else : ?>
<p><?php _e( 'Super admin privileges cannot be removed because this user has the network admin email.' ); ?></p>
<?php endif; ?>
</td></tr>
<?php } ?>
<?php } ?>
<tr class="user-first-name-wrap">
<th><label for="first_name"><?php _e( 'First Name' ); ?></label></th>

View File

@ -288,40 +288,40 @@ switch ( $wp_list_table->current_action() ) {
?>
<input type="hidden" name="delete_option" value="delete" />
<?php else : ?>
<?php if ( 1 == $go_delete ) : ?>
<?php if ( 1 == $go_delete ) : ?>
<fieldset><p><legend><?php _e( 'What should be done with content owned by this user?' ); ?></legend></p>
<?php else : ?>
<fieldset><p><legend><?php _e( 'What should be done with content owned by these users?' ); ?></legend></p>
<?php endif; ?>
<ul style="list-style:none;">
<li><label><input type="radio" id="delete_option0" name="delete_option" value="delete" />
<?php _e( 'Delete all content.' ); ?></label></li>
<?php _e( 'Delete all content.' ); ?></label></li>
<li><input type="radio" id="delete_option1" name="delete_option" value="reassign" />
<?php
echo '<label for="delete_option1">' . __( 'Attribute all content to:' ) . '</label> ';
wp_dropdown_users(
array(
'name' => 'reassign_user',
'exclude' => array_diff( $userids, array( $current_user->ID ) ),
'show' => 'display_name_with_login',
)
);
?>
<?php
echo '<label for="delete_option1">' . __( 'Attribute all content to:' ) . '</label> ';
wp_dropdown_users(
array(
'name' => 'reassign_user',
'exclude' => array_diff( $userids, array( $current_user->ID ) ),
'show' => 'display_name_with_login',
)
);
?>
</li>
</ul></fieldset>
<?php
<?php
endif;
/**
* Fires at the end of the delete users form prior to the confirm button.
*
* @since 4.0.0
* @since 4.5.0 The `$userids` parameter was added.
*
* @param WP_User $current_user WP_User object for the current user.
* @param int[] $userids Array of IDs for users being deleted.
*/
do_action( 'delete_user_form', $current_user, $userids );
?>
/**
* Fires at the end of the delete users form prior to the confirm button.
*
* @since 4.0.0
* @since 4.5.0 The `$userids` parameter was added.
*
* @param WP_User $current_user WP_User object for the current user.
* @param int[] $userids Array of IDs for users being deleted.
*/
do_action( 'delete_user_form', $current_user, $userids );
?>
<input type="hidden" name="action" value="dodelete" />
<?php submit_button( __( 'Confirm Deletion' ), 'primary' ); ?>
<?php else : ?>
@ -522,12 +522,12 @@ switch ( $wp_list_table->current_action() ) {
<?php
endif;
if ( ! empty( $messages ) ) {
foreach ( $messages as $msg ) {
echo $msg;
}
}
?>
if ( ! empty( $messages ) ) {
foreach ( $messages as $msg ) {
echo $msg;
}
}
?>
<div class="wrap">
<h1 class="wp-heading-inline">

View File

@ -24,7 +24,7 @@
*/
return;
endif;
?>
?>
<?php // You can start editing here -- including this comment! ?>

View File

@ -55,14 +55,14 @@
<?php endif; // end twentyeleven_get_gallery_images() check ?>
<?php the_excerpt(); ?>
<?php endif; ?>
<?php
wp_link_pages(
array(
'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>',
'after' => '</div>',
)
);
?>
<?php
wp_link_pages(
array(
'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>',
'after' => '</div>',
)
);
?>
</div><!-- .entry-content -->
<?php endif; ?>

View File

@ -36,16 +36,16 @@
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php else : ?>
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
<?php
<?php
endif;
$description = get_bloginfo( 'description', 'display' );
if ( $description || is_customize_preview() ) :
?>
if ( $description || is_customize_preview() ) :
?>
<p class="site-description"><?php echo $description; ?></p>
<?php
<?php
endif;
?>
?>
<button class="secondary-toggle"><?php _e( 'Menu and widgets', 'twentyfifteen' ); ?></button>
</div><!-- .site-branding -->
</header><!-- .site-header -->

View File

@ -209,7 +209,7 @@ if ( ! function_exists( 'twentyfifteen_post_thumbnail' ) ) :
?>
</a>
<?php
<?php
endif; // End is_singular()
}
endif;

View File

@ -19,8 +19,8 @@
<?php
endif;
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
endif;

View File

@ -19,8 +19,8 @@
<?php
endif;
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
endif;

View File

@ -19,8 +19,8 @@
<?php
endif;
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
endif;

View File

@ -19,8 +19,8 @@
<?php
endif;
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
endif;

View File

@ -19,8 +19,8 @@
<?php
endif;
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
endif;

View File

@ -20,12 +20,12 @@
<?php elseif ( is_search() ) : ?>
<p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentyfourteen' ); ?></p>
<?php get_search_form(); ?>
<?php get_search_form(); ?>
<?php else : ?>
<p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'twentyfourteen' ); ?></p>
<?php get_search_form(); ?>
<?php get_search_form(); ?>
<?php endif; ?>
</div><!-- .page-content -->

View File

@ -19,8 +19,8 @@
<?php
endif;
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
endif;

View File

@ -19,8 +19,8 @@
<?php
endif;
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
endif;

View File

@ -21,8 +21,8 @@
<?php
endif;
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
endif;

View File

@ -197,16 +197,16 @@ if ( ! function_exists( 'twentyfourteen_post_thumbnail' ) ) :
<?php else : ?>
<a class="post-thumbnail" href="<?php the_permalink(); ?>" aria-hidden="true">
<?php
if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) ) {
the_post_thumbnail( 'twentyfourteen-full-width' );
} else {
the_post_thumbnail( 'post-thumbnail', array( 'alt' => get_the_title() ) );
}
?>
<?php
if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) ) {
the_post_thumbnail( 'twentyfourteen-full-width' );
} else {
the_post_thumbnail( 'post-thumbnail', array( 'alt' => get_the_title() ) );
}
?>
</a>
<?php
<?php
endif; // End is_singular()
}
endif;

View File

@ -30,6 +30,6 @@
get_search_form();
endif;
?>
?>
</div><!-- .page-content -->
</section><!-- .no-results -->

View File

@ -35,12 +35,12 @@
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php else : ?>
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
<?php
<?php
endif;
$description = get_bloginfo( 'description', 'display' );
if ( $description || is_customize_preview() ) :
?>
if ( $description || is_customize_preview() ) :
?>
<p class="site-description"><?php echo $description; ?></p>
<?php endif; ?>
</div><!-- .site-branding -->

View File

@ -145,7 +145,7 @@ if ( ! function_exists( 'twentysixteen_post_thumbnail' ) ) :
<?php the_post_thumbnail( 'post-thumbnail', array( 'alt' => the_title_attribute( 'echo=0' ) ) ); ?>
</a>
<?php
<?php
endif; // End is_singular()
}
endif;

View File

@ -133,7 +133,7 @@ while ( have_posts() ) :
</div><!-- .entry-utility -->
</div><!-- #post-## -->
<?php /* How to display all other posts. */ ?>
<?php /* How to display all other posts. */ ?>
<?php else : ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
@ -143,7 +143,7 @@ while ( have_posts() ) :
<?php twentyten_posted_on(); ?>
</div><!-- .entry-meta -->
<?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
<?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->

View File

@ -20,12 +20,12 @@
<?php elseif ( is_search() ) : ?>
<p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with different keywords.', 'twentythirteen' ); ?></p>
<?php get_search_form(); ?>
<?php get_search_form(); ?>
<?php else : ?>
<p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'twentythirteen' ); ?></p>
<?php get_search_form(); ?>
<?php get_search_form(); ?>
<?php endif; ?>
</div><!-- .page-content -->

View File

@ -110,13 +110,13 @@ if ( have_comments() ) :
<content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php echo get_the_password_form(); ?>]]></content>
<?php else : // post pass ?>
<content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php comment_text(); ?>]]></content>
<?php
<?php
endif; // post pass
// Return comment threading information (https://www.ietf.org/rfc/rfc4685.txt)
if ( $comment->comment_parent == 0 ) : // This comment is top level
?>
if ( $comment->comment_parent == 0 ) : // This comment is top level
?>
<thr:in-reply-to ref="<?php the_guid(); ?>" href="<?php the_permalink_rss(); ?>" type="<?php bloginfo_rss( 'html_type' ); ?>" />
<?php
<?php
else : // This comment is in reply to another comment
$parent_comment = get_comment( $comment->comment_parent );
// The rel attribute below and the id tag above should be GUIDs, but WP doesn't create them for comments (unlike posts). Either way, it's more important that they both use the same system

View File

@ -66,7 +66,7 @@ do_action( 'rss_tag_pre', 'atom' );
* @since 3.2.0
*/
do_action( 'atom_author' );
?>
?>
</author>
<title type="<?php html_type_rss(); ?>"><![CDATA[<?php the_title_rss(); ?>]]></title>
<link rel="alternate" type="<?php bloginfo_rss( 'html_type' ); ?>" href="<?php the_permalink_rss(); ?>" />

View File

@ -105,7 +105,7 @@ do_action( 'rss_tag_pre', 'rss2-comments' );
<?php else : // post pass ?>
<description><![CDATA[<?php comment_text_rss(); ?>]]></description>
<content:encoded><![CDATA[<?php comment_text(); ?>]]></content:encoded>
<?php
<?php
endif; // post pass
/**
* Fires at the end of each RSS2 comment feed item.
@ -116,7 +116,7 @@ do_action( 'rss_tag_pre', 'rss2-comments' );
* @param int $comment_post->ID The ID of the post the comment is connected to.
*/
do_action( 'commentrss2_item', $comment->comment_ID, $comment_post->ID );
?>
?>
</item>
<?php
endwhile;

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.1-beta1-44573';
$wp_version = '5.1-beta1-44574';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -131,7 +131,7 @@ class WP_Widget_Archives extends WP_Widget {
?>
</ul>
<?php
}
}
echo $args['after_widget'];
}

View File

@ -493,7 +493,7 @@ class WP_Widget_Text extends WP_Widget {
<p>
<input id="<?php echo $this->get_field_id( 'filter' ); ?>" name="<?php echo $this->get_field_name( 'filter' ); ?>" type="checkbox"<?php checked( ! empty( $instance['filter'] ) ); ?> />&nbsp;<label for="<?php echo $this->get_field_id( 'filter' ); ?>"><?php _e( 'Automatically add paragraphs' ); ?></label>
</p>
<?php
<?php
endif;
}

View File

@ -1114,13 +1114,13 @@ switch ( $action ) {
d.value = '';
<?php } else { ?>
d = document.getElementById('user_login');
<?php if ( 'invalid_username' == $errors->get_error_code() ) { ?>
<?php if ( 'invalid_username' == $errors->get_error_code() ) { ?>
if( d.value != '' )
d.value = '';
<?php
}
}
?>
<?php
}
}
?>
d.focus();
d.select();
} catch(e){}

View File

@ -139,9 +139,9 @@ function show_blog_form( $blogname = '', $blog_title = '', $errors = '' ) {
<?php if ( $errmsg = $errors->get_error_message( 'blog_title' ) ) { ?>
<p class="error"><?php echo $errmsg; ?></p>
<?php
}
}
echo '<input name="blog_title" type="text" id="blog_title" value="' . esc_attr( $blog_title ) . '" />';
?>
?>
<?php
// Site Language.