WordPress.org

Make WordPress Core

Opened 8 weeks ago

Last modified 25 hours ago

#52627 new task (blessed)

Coding Standards fixes for WP 5.8

Reported by: SergeyBiryukov Owned by:
Milestone: 5.8 Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: coding-standards Cc:

Description

Previously:

Change History (30)

#1 @SergeyBiryukov
5 weeks ago

In 50533:

Coding Standards: Remove some extra whitespace in sanitize_comment_cookies().

See #52627.

#2 @SergeyBiryukov
4 weeks ago

In 50557:

Coding Standards: Use strict comparison in wp-admin/includes/class-wp-upgrader.php.

See #52627.

#3 @SergeyBiryukov
4 weeks ago

In 50558:

Coding Standards: Use strict comparison for return type checks in a few functions:

  • get_bookmark()
  • get_comment()
  • get_post()
  • get_children()
  • wp_get_recent_posts()
  • wp_get_post_revision()
  • wp_get_nav_menu_items()

Follow-up to [45710] for get_term(), [48507] for wpdb::get_row() and wpdb::get_results().

See #52627.

#4 @SergeyBiryukov
4 weeks ago

In 50560:

Coding Standards: Add missing semicolon to some endif keywords.

See #52627.

#5 @SergeyBiryukov
4 weeks ago

In 50561:

Coding Standards: Move some translator comments to the correct place.

Follow-up to [48172].

See #52627.

#6 @SergeyBiryukov
3 weeks ago

In 50618:

Coding Standards: Remove some extra whitespace in _wp_translate_postdata().

See #52627.

#7 follow-up: @davidbaumwald
2 weeks ago

In [50631]:

Coding Standards: Removing unnecessary parentheses from require_once in wp-admin/options-privacy.php.

In [47198], parentheses were removed from include and require statements, as they are language constructs, not function calls. However, [50161] introduced a new require_once instance in wp-admin/options-privacy.php. This change removes the unnecessary parentheses.

See #53627.

Last edited 2 weeks ago by davidbaumwald (previous) (diff)

#8 @davidbaumwald
2 weeks ago

In 50632:

Coding Standards: Remove some extra whitespace in get_item_schema.

Introduced in [50527].

See #52627.

#9 in reply to: ↑ 7 ; follow-up: @mukesh27
2 weeks ago

@davidbaumwald Do we need to remove parentheses from here https://github.com/WordPress/WordPress/blob/master/wp-includes/class-requests.php#L146?

Replying to davidbaumwald:

In [50631]:

Coding Standards: Removing unnecessary parentheses from require_once in wp-admin/options-privacy.php.

In [47198], parentheses were removed from include and require statements, as they are language constructs, not function calls. However, [50161] introduced a new require_once instance in wp-admin/options-privacy.php. This change removes the unnecessary parentheses.

See #53627.

#10 in reply to: ↑ 9 @davidbaumwald
2 weeks ago

Replying to mukesh27:

@davidbaumwald Do we need to remove parentheses from here https://github.com/WordPress/WordPress/blob/master/wp-includes/class-requests.php#L146?

Replying to davidbaumwald:

In [50631]:

Coding Standards: Removing unnecessary parentheses from require_once in wp-admin/options-privacy.php.

In [47198], parentheses were removed from include and require statements, as they are language constructs, not function calls. However, [50161] introduced a new require_once instance in wp-admin/options-privacy.php. This change removes the unnecessary parentheses.

See #53627.

@mukesh27 Good catch, but that's one of the third-party library exclusions. See https://core.trac.wordpress.org/browser/tags/5.7/phpcs.xml.dist#L116

#11 @mukesh27
2 weeks ago

@davidbaumwald Thanks for the information.

https://github.com/WordPress/WordPress/commits/master/wp-includes/class-requests.php

If you check GitHub history for that file then you found that core developer's changed some code as per new possible updates.

#12 @SergeyBiryukov
2 weeks ago

In 50652:

Coding Standards: Use strict comparison in wp-admin/includes/class-core-upgrader.php.

See #52627.

#13 @SergeyBiryukov
2 weeks ago

In 50654:

Coding Standards: Move some translator comments to the correct place.

Follow-up to [46273], [50060], [50117].

See #52627.

#14 @SergeyBiryukov
2 weeks ago

Since [50060] and [50117] were in 5.7, going to merge [50654] to the 5.7 branch too.

#15 @SergeyBiryukov
2 weeks ago

In 50655:

Coding Standards: Move some translator comments to the correct place.

Follow-up to [46273], [50060], [50117].

Merges [50654] to the 5.7 branch.
See #52627.

#16 @SergeyBiryukov
13 days ago

In 50657:

Coding Standards: Use strict comparison in wp-admin/includes/class-wp-filesystem-*.php.

See #52627.

#17 @SergeyBiryukov
13 days ago

In 50658:

Coding Standards: Give some variables in WP_Importer a more meaningful name.

See #52627.

#18 @SergeyBiryukov
12 days ago

In 50664:

Coding Standards: Use strict comparison in wp-admin/includes/comment.php.

See #52627.

#19 @SergeyBiryukov
12 days ago

In 50665:

Coding Standards: Use strict comparison in wp-admin/includes/credits.php.

See #52627.

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


12 days ago

#21 @SergeyBiryukov
11 days ago

In 50689:

Coding Standards: Use strict comparison in wp-admin/includes/dashboard.php.

Includes minor code layout fixes for better readability.

See #52627.

#22 @SergeyBiryukov
8 days ago

In 50696:

Coding Standards: Give a variable in wp-admin/themes.php a more meaningful name.

Follow-up to [20029].

See #52627.

#23 @SergeyBiryukov
7 days ago

In 50699:

Coding Standards: Simplify the check for parent terms in export_wp().

This is more consistent with similar checks elsewhere in core.

See #52627.

#24 @SergeyBiryukov
6 days ago

In 50700:

Coding Standards: Use strict comparison in wp-admin/includes/file.php.

Includes minor code layout fixes for better readability.

See #52627.

#25 @SergeyBiryukov
6 days ago

In 50701:

Coding Standards: Rewrite a fragment in request_filesystem_credentials() for clarity and to avoid repetition.

Follow-up to [8540], [8865].

See #52627.

#26 @SergeyBiryukov
5 days ago

In 50706:

Coding Standards: Use strict comparison in wp-admin/includes/class-custom-background.php.

Includes minor code layout fixes for better readability.

See #52627.

#27 @SergeyBiryukov
5 days ago

In 50707:

Coding Standards: Use strict comparison in wp-admin/includes/class-custom-image-header.php.

Includes minor code layout fixes for better readability.

See #52627.

#28 @SergeyBiryukov
3 days ago

In 50759:

Coding Standards: Give a variable in WP_Automatic_Updater::after_core_update() a more meaningful name.

Follow-up to [25841], [25873], [25882].

See #52627.

#29 @SergeyBiryukov
2 days ago

In 50762:

Coding Standards: Use strict comparison in wp-admin/includes/class-wp-automatic-updater.php.

Includes minor code layout fixes for better readability.

See #52627.

#30 @SergeyBiryukov
25 hours ago

In 50767:

Coding Standards: Use strict comparison in wp-admin/includes/class-walker-nav-menu-edit.php.

See #52627.

Note: See TracTickets for help on using tickets.