Make WordPress Core

Opened 12 months ago

Closed 12 months ago

Last modified 12 months ago

#58053 closed defect (bug) (fixed)

Fixing Multi-line PHP Snippet Embedding in wp-admin/network/user-new.php

Reported by: faisalahammad's profile faisalahammad Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.3 Priority: normal
Severity: normal Version: 6.2
Component: Administration Keywords: has-patch
Focuses: coding-standards Cc:

Description

I've noticed that the file wp-admin/network/user-new.php on line 103 has a multi-line PHP snippet that violates the recommended coding standard of WordPress. Specifically, the closing PHP tag is not on a new line, making the code harder to read and understand.

To adhere to the WordPress coding standard and make the code easier to maintain, I propose to fix this issue by moving the closing PHP tag to a new line.

Change History (6)

This ticket was mentioned in PR #4286 on WordPress/wordpress-develop by @faisalahammad.


12 months ago
#1

  • Keywords has-patch added; needs-patch removed

I've noticed that the file wp-admin/network/user-new.php on line 103 has a multi-line PHP snippet that violates the recommended coding standard of WordPress. Specifically, the closing PHP tag is not on a new line, making the code harder to read and understand.

To adhere to the WordPress coding standard and make the code easier to maintain, I propose to fix this issue by moving the closing PHP tag to a new line. I have created a pull request that implements this change.

Please review and merge the pull request if you find it acceptable. Thank you for your attention to this matter.

Trac ticket: https://core.trac.wordpress.org/ticket/58053

@audrasjb commented on PR #4286:


12 months ago
#2

@faisalahammad thanks for the PR! However, it looks like it doesn't contain the change described in the ticket, and that it adds an unrelated change instead :)

@faisalahammad commented on PR #4286:


12 months ago
#3

Thank you @audrasjb
I've pushed down the ?> to a new line. Could you please recheck and let me know if I've missed anything?

#4 @SergeyBiryukov
12 months ago

  • Component changed from General to Administration
  • Milestone changed from Awaiting Review to 6.3

#5 @SergeyBiryukov
12 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 55618:

Coding Standards: Correct the closing PHP tag placement in some admin files.

Follow-up to [1596], [1818], [11009], [16183], [16582], [16592].

Props faisalahammad, audrasjb.
Fixes #58053.

@SergeyBiryukov commented on PR #4286:


12 months ago
#6

Thanks for the PR! Merged in r55618.

Note: See TracTickets for help on using tickets.