mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-04 06:37:06 +00:00
Coding Standards: Upgrade WPCS to 1.0.0
WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues. This change includes three notable additions: - Multiline function calls must now put each parameter on a new line. - Auto-formatting files is now part of the `grunt precommit` script. - Auto-fixable coding standards issues will now cause Travis failures. Fixes #44600. git-svn-id: https://develop.svn.wordpress.org/trunk@43571 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -110,7 +110,7 @@ function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) {
|
||||
if ( ! $diff && 'post_title' === $field ) {
|
||||
// It's a better user experience to still show the Title, even if it didn't change.
|
||||
// No, you didn't see this.
|
||||
$diff = '<table class="diff"><colgroup><col class="content diffsplit left"><col class="content diffsplit middle"><col class="content diffsplit right"></colgroup><tbody><tr>';
|
||||
$diff = '<table class="diff"><colgroup><col class="content diffsplit left"><col class="content diffsplit middle"><col class="content diffsplit right"></colgroup><tbody><tr>';
|
||||
|
||||
// In split screen mode, show the title before/after side by side.
|
||||
if ( true === $args['show_split_view'] ) {
|
||||
@@ -124,7 +124,7 @@ function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) {
|
||||
}
|
||||
}
|
||||
|
||||
$diff .= '</tr></tbody>';
|
||||
$diff .= '</tr></tbody>';
|
||||
$diff .= '</table>';
|
||||
}
|
||||
|
||||
@@ -167,7 +167,8 @@ function wp_prepare_revisions_for_js( $post, $selected_revision_id, $from = null
|
||||
$now_gmt = time();
|
||||
|
||||
$revisions = wp_get_post_revisions(
|
||||
$post->ID, array(
|
||||
$post->ID,
|
||||
array(
|
||||
'order' => 'ASC',
|
||||
'check_enabled' => false,
|
||||
)
|
||||
@@ -194,7 +195,9 @@ function wp_prepare_revisions_for_js( $post, $selected_revision_id, $from = null
|
||||
$modified_gmt = strtotime( $revision->post_modified_gmt . ' +0000' );
|
||||
if ( $can_restore ) {
|
||||
$restore_link = str_replace(
|
||||
'&', '&', wp_nonce_url(
|
||||
'&',
|
||||
'&',
|
||||
wp_nonce_url(
|
||||
add_query_arg(
|
||||
array(
|
||||
'revision' => $revision->ID,
|
||||
@@ -394,7 +397,7 @@ function wp_print_revision_templates() {
|
||||
__( 'Autosave by %s' ),
|
||||
'<span class="author-name">{{ data.attributes.author.name }}</span>'
|
||||
);
|
||||
?>
|
||||
?>
|
||||
</span>
|
||||
<# } else if ( data.attributes.current ) { #>
|
||||
<span class="byline">
|
||||
@@ -403,7 +406,7 @@ function wp_print_revision_templates() {
|
||||
__( 'Current Revision by %s' ),
|
||||
'<span class="author-name">{{ data.attributes.author.name }}</span>'
|
||||
);
|
||||
?>
|
||||
?>
|
||||
</span>
|
||||
<# } else { #>
|
||||
<span class="byline">
|
||||
@@ -412,7 +415,7 @@ function wp_print_revision_templates() {
|
||||
__( 'Revision by %s' ),
|
||||
'<span class="author-name">{{ data.attributes.author.name }}</span>'
|
||||
);
|
||||
?>
|
||||
?>
|
||||
</span>
|
||||
<# } #>
|
||||
<span class="time-ago">{{ data.attributes.timeAgo }}</span>
|
||||
|
||||
Reference in New Issue
Block a user