[wp-trac] [WordPress Trac] #57371: Twenty Twenty: Remove Unused function parameter and variable.
WordPress Trac
noreply at wordpress.org
Sat Apr 29 16:59:33 UTC 2023
#57371: Twenty Twenty: Remove Unused function parameter and variable.
-----------------------------------------+-------------------------------
Reporter: upadalavipul | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.3
Component: Bundled Theme | Version:
Severity: normal | Resolution:
Keywords: has-patch changes-requested | Focuses: coding-standards
-----------------------------------------+-------------------------------
Changes (by sabernhardt):
* keywords: has-patch => has-patch changes-requested
* focuses: => coding-standards
* milestone: Awaiting Review => 6.3
Comment:
Not using the `$n` line break variable may have been a mistake, though
removing the variable probably would be better than adding it to the
markup now.
The global `$post` variable should stay. According to the
[https://developer.wordpress.org/reference/functions/setup_postdata/
setup_postdata documentation], "`setup_postdata()` does **not** assign the
global `$post` variable so it’s important that you do this yourself."
When removing the last parameter from the
`twentytwenty_filter_wp_list_pages_item_classes` and
`twentytwenty_add_sub_toggles_to_main_menu` functions, also remove the
parameter from those functions' documentation and decrease the count
argument in the related filters.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57371#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list