#57397 closed defect (bug) (fixed)
Twenty Nineteen: Remove Unused function parameter and variable.
Reported by: | upadalavipul | Owned by: | audrasjb |
---|---|---|---|
Milestone: | 6.3 | Priority: | normal |
Severity: | normal | Version: | 5.0 |
Component: | Bundled Theme | Keywords: | has-patch commit |
Focuses: | coding-standards | Cc: |
Description
I have reviewed twenty-nineteen theme codes and I found some of the function parameters and variables Unused. So I have to remove it from the below files.
Files:
- twentynineteen/comments.php
- twentynineteen/inc/template-functions.php
Attachments (2)
Change History (21)
This ticket was mentioned in PR #4225 on WordPress/wordpress-develop by @mukesh27.
21 months ago
#4
- Keywords has-patch added
Trac ticket: https://core.trac.wordpress.org/ticket/57397
#7
@
21 months ago
- Keywords commit added
PR 4225 looks good to me and adjusts the add_filter()
calls to reduce the number of accepted arguments.
Adding for commit
consideration.
#9
@
21 months ago
- The
twentynineteen_post_thumbnail_sizes_attr
filter shows the default priority and accepted arguments, 10, 1
. The two filters could be consistent. - The
twentynineteen_nav_menu_link_attributes
DocBlock has a typo we could fix (either here or on #57840): "Adjustments to menu attributes tot support WCAG 2.0 recommendations for flyout and dropdown menus." - I like that the PR uses the variable for comments navigation, but those translations probably should be replaced anyway (on a new ticket, #58149). Separating "Previous" and "Next" from "Comments" can result in faulty translations.
@sabernhardt commented on PR #4225:
20 months ago
#10
Changeset 55655 replaced the comments navigation text strings for better translations, so the $comments_text
variable is already removed from comments.php
.
#13
@
18 months ago
- Keywords commit added
PR 4225 get several approvals. @SergeyBiryukov Could you please review it.
Adding for commit
consideration.
#16
@
18 months ago
- Status changed from reviewing to accepted
This looks good. I also spotted a few other docblock issues or improvements in this file and will commit them directly.
@audrasjb commented on PR #4225:
18 months ago
#18
committed in https://core.trac.wordpress.org/changeset/55963
@
14 months ago
I have worked on another theme and found same issue, Here I have added my patch for another theme.
Hello @upadalavipul,
Welcome to back to WordPress Core's Trac!
I'm doing prep before tomorrow's 6.2 RC1 and noticed this ticket's
Version
is set totrunk
(saw it in Report 40). The code for this ticket was not introduced in 6.2. So I'll removetrunk
as theVersion
.