WordPress.org

Make WordPress Core

Opened 12 months ago

Closed 9 months ago

#44951 closed enhancement (fixed)

Don't assign a variable inside an If statement in get_the_modified_author()

Reported by: promz Owned by: pento
Milestone: 5.1 Priority: normal
Severity: minor Version: 5.1
Component: Posts, Post Types Keywords: has-patch
Focuses: coding-standards Cc:

Description

In the wp-admin/author-template.php > get_the_modified_author() function, there is a $last_id variable being declared inside an if statement. It is not a good coding practice. One might think that there is a mistake of comparison operator.

Attachments (1)

author-template.php.patch (509 bytes) - added by promz 12 months ago.

Download all attachments as: .zip

Change History (7)

#1 @promz
12 months ago

  • Component changed from General to Administration
  • Keywords has-patch added; needs-patch removed
  • Severity changed from normal to minor

#2 @mukesh27
12 months ago

  • Component changed from Administration to Posts, Post Types
  • Summary changed from Dont assign a variable inside an If statement in get_the_modified_author() to Don't assign a variable inside an If statement in get_the_modified_author()

Hi @promz, Welcome to WordPress Trac! Thanks for the ticket.

Last edited 12 months ago by mukesh27 (previous) (diff)

#3 @SergeyBiryukov
12 months ago

  • Milestone changed from Awaiting Review to 5.0
  • Owner set to SergeyBiryukov
  • Status changed from assigned to reviewing

#4 @peterwilsoncc
12 months ago

  • Milestone changed from 5.0 to 5.1

Moving to the 5.1 milestone due to the WordPress 5.0 focus on the new
editor (Gutenberg).

#5 @pento
9 months ago

  • Owner changed from SergeyBiryukov to pento
  • Status changed from reviewing to accepted

#6 @pento
9 months ago

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

In 44461:

Coding Standards: Improve the readability of get_the_modified_author().

Props promz.
Fixes #44951.

Note: See TracTickets for help on using tickets.