Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 2 years ago

#54275 closed enhancement (fixed)

need to remove some empty html element (span)

Reported by: sayedulsayem's profile sayedulsayem Owned by: sayedulsayem's profile sayedulsayem
Milestone: 5.9 Priority: normal
Severity: normal Version:
Component: Help/About Keywords: has-patch commit
Focuses: ui, coding-standards Cc:

Description

In credits.php file during show core contributors there are some empty span element which is not necessary to generate.

During showing core contribution it's accessing $person_data[3] without any checking. Not every contributor have title so some cases $person_data[3] return empty string. In that case, It's not necessary to print empty string into span element.

See the screenshot below to understand it properly.

Attachments (2)

markup-improvement-screenshot.jpg (220.7 KB) - added by sayedulsayem 3 years ago.
54275.diff (899 bytes) - added by sayedulsayem 3 years ago.
patch added

Download all attachments as: .zip

Change History (15)

@sayedulsayem
3 years ago

patch added

#1 @sayedulsayem
3 years ago

  • Keywords has-patch added

#2 @audrasjb
3 years ago

Hi, thanks for spotting this and opening a ticket.

However, while I understand it is not optimal, I'm wondering what is the benefit of this change. The current code is valid and also we can't change the about page of previously released WordPress versions.

#3 follow-up: @audrasjb
3 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 5.9
  • Version trunk deleted

Hmm… ok I have to apology because I didn't read your patch before commenting.
The code looks good to me. A nice tiny enhancement. Moving to milestone 5.9 and marking for commit.

#4 in reply to: ↑ 3 @sayedulsayem
3 years ago

Thank you. I was confused about your previous comment. That's why I didn't say anything. Thank you for your apology and double review.

Replying to audrasjb:

Hmm… ok I have to apologize because I didn't read your patch before commenting.
The code looks good to me. A nice tiny enhancement. Moving to milestone 5.9 and marking for commit.

#5 @mukesh27
3 years ago

  • Type changed from defect (bug) to enhancement

Looks good to me.

Set ticket type to enhancement.

This ticket was mentioned in PR #1764 on WordPress/wordpress-develop by sayedulsayem.


3 years ago
#6

In credits.php file, during show core contributors there are some empty span element which is not necessary to generate.
During showing core contribution it's accessing $person_data[3] without any checking. Not every contributor has a title so in some cases, $person_data[3] returns an empty string. In that case, It's not necessary to print empty strings into the span element.
See the screenshot below to understand it properly.

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

This ticket was mentioned in PR #1766 on WordPress/wordpress-develop by sayedulsayem.


3 years ago
#7

In credits.php file, during show core contributors there are some empty span element which is not necessary to generate.
During showing core contribution it's accessing $person_data[3] without any checking. Not every contributor has a title so in some cases, $person_data[3] returns an empty string. In that case, It's not necessary to print empty strings into the span element.
See the screenshot below to understand it properly.

Trac ticket: core.trac.wordpress.org/ticket/54275

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


3 years ago

#9 follow-up: @audrasjb
3 years ago

For committers: just noting the good patch to commit is 54275.diff as the PR looks wrong. (EDIT: the first PR is closed, the second one is an exact matching of the diff file)

Last edited 3 years ago by audrasjb (previous) (diff)

#10 in reply to: ↑ 9 @sayedulsayem
3 years ago

There is something wrong with the first PR. That's why I made another one. Can you please look into the second PR?
Replying to audrasjb:

For committers: just noting the good patch to commit is 54275.diff as the PR looks wrong.

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


3 years ago

#12 @SergeyBiryukov
3 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 51920:

Help/About: Don't output empty <span> tags on Credits screen.

If the contributor does not have a title, the empty tags are not necessary.

Follow-up to [17877], [17909], [17942], [18162], [19143], [46709].

Props sayedulsayem, audrasjb, mukesh27.
Fixes #54275.

Note: See TracTickets for help on using tickets.