Make WordPress Core

Opened 6 years ago

Closed 4 years ago

Last modified 4 years ago

#44088 closed enhancement (wontfix)

Merged two if into single in get_the_term_list()

Reported by: rnaby's profile rnaby Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Taxonomy Keywords: has-patch needs-testing
Focuses: template Cc:

Description

In get_the_term_list function there is no need to check with two if conditions. As at line 1246 of the same file inside get_the_terms function it is returning false when the $terms is empty then there is no need to check it again in get_the_term_list I think.

Attachments (1)

44088.diff (591 bytes) - added by rnaby 6 years ago.
The patch for the ticket.

Download all attachments as: .zip

Change History (4)

@rnaby
6 years ago

The patch for the ticket.

#1 @pento
6 years ago

  • Version trunk deleted

#2 @SergeyBiryukov
4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Hi there, thanks for the patch! Sorry it took so long for someone to get back to it.

The existing code looks a bit clearer to me.

#3 @SergeyBiryukov
4 years ago

  • Summary changed from Merged two if into single to Merged two if into single in get_the_term_list()
Note: See TracTickets for help on using tickets.