#48633 closed defect (bug) (invalid)
Twenty Twenty theme may be requires attached patch coding changes.
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Bundled Theme | Keywords: | |
Focuses: | Cc: |
Description
I was passed out twenty twenty theme code and i was saw below code i think this code need to be change.
Attachments (1)
Change History (8)
#2
@
4 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
#3
@
4 years ago
@Otto42
Please check this variable scope in theme. We don't need use this variable because this variable has null throughout theme.
$post_meta_classes
I follow latest WordPress theme for coding standards but /wp-content/themes/twentytwenty/template-parts/entry-header.php in this file have two static variables one variable was escaped and one variable was not escaped.
<header class="entry-header has-text-align-center<?php echo esc_attr( $entry_header_classes ); ?>"> <div class="intro-text section-inner max-percentage<?php echo $intro_text_width; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- static output ?>">
#5
@
4 years ago
- Resolution set to invalid
- Status changed from reopened to closed
Please do not reopen tickets without a valid reason. Thanks.
#6
follow-up:
↓ 7
@
4 years ago
The $intro_text_width is correct in that it not meant to be filterable, it's "small" or "thin" and that's it, more or less. Thus, no need for escaping.
The $post_meta_classes (and the $post_meta_wrapper_classes) appear to have been intended to be filterable but the apply_filters calls are missing. This should be corrected in the next version of the theme. However, had they been filterable, then these escapes would be correct.
@chintan1896 This code appears to already be correct to me. All you have done in your patch is to remove the additional classes from the post meta, and incorrectly eliminated the attribute escaping on the header.