WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 6 weeks ago

#44111 new enhancement

Setting data to variable early.

Reported by: rnaby Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch needs-testing close
Focuses: administration Cc:

Description

I think setting data to variable early.

Attachments (1)

44111.diff (1.1 KB) - added by rnaby 3 years ago.
The patch for the ticket.

Download all attachments as: .zip

Change History (5)

@rnaby
3 years ago

The patch for the ticket.

#1 @SergeyBiryukov
3 years ago

  • Keywords reporter-feedback close added; dev-feedback removed

Hi @rnaby, welcome to WordPress Trac!

The existing code looks fine to me as is. Is there a problem solved by this patch?

#2 @rnaby
3 years ago

@SergeyBiryukov Thanks for giving feedback. Actually, it's not solving problem, I proposed it for a cleaner approach. Like we are setting some data to a variable and if some condition has met only then we're changing it. Otherwise it's being what it was. I think it makes the code simple and a little less lengthy to read or understand.

#3 @pento
2 years ago

  • Version trunk deleted

#4 @hellofromTonya
6 weeks ago

  • Keywords reporter-feedback removed

Removing reporter-feedback as @rnaby provided reasoning behind the ticket and patch.

@SergeyBiryukov What do you think?

Note: See TracTickets for help on using tickets.