Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add missing space before checked and remove outdated xhtml closing slash #8433

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/wp-admin/includes/class-wp-screen.php
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ public function render_list_table_columns_preferences() {

$id = "$column-hide";
echo '<label>';
echo '<input class="hide-column-tog" name="' . $id . '" type="checkbox" id="' . $id . '" value="' . $column . '"' . checked( ! in_array( $column, $hidden, true ), true, false ) . ' />';
echo '<input class="hide-column-tog" name="' . $id . '" type="checkbox" id="' . $id . '" value="' . $column . '" ' . checked( ! in_array( $column, $hidden, true ), true, false ) . '>';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
echo '<input class="hide-column-tog" name="' . $id . '" type="checkbox" id="' . $id . '" value="' . $column . '" ' . checked( ! in_array( $column, $hidden, true ), true, false ) . '>';
echo '<input class="hide-column-tog" name="' . $id . '" type="checkbox" id="' . $id . '" value="' . $column . '" ' . checked( ! in_array( $column, $hidden, true ), true, false ) . ' />';

I'd prefer to keep the self closing tag (<input /> rather than <input>)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer not to. This isn't valid HTML and a legacy leftover WP should finally get rid of - see Yoast/wordpress-seo#21858

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The legacy markup is still part of the HTML Coding Standards. The tags should keep the termination for now.

If/when the coding standards change, then the markup would be revised throughout the admin area.

echo "$title</label>\n";
}
?>
Expand Down
Loading