Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#38384 closed defect (bug) (fixed)

Twenty Seventeen: Replace inline control structure in `twentyseventeen_content_image_sizes_attr()`

Reported by: ocean90's profile ocean90 Owned by: davidakennedy's profile davidakennedy
Milestone: 4.7 Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: good-first-bug has-patch
Focuses: Cc:



To improve code readability the lines 317 and 321 should be changed to a proper if ( ) {} block. Also, per WordPress' coding standards, yoda conditons should only be used for ==, !=, ===, and !==.

Attachments (2)

readability-patch.38384.diff (915 bytes) - added by vrundakansara 8 years ago.
Code readability bug fixed
38384.diff (1.1 KB) - added by aaroncampbell 8 years ago.

Download all attachments as: .zip

Change History (9)

#1 @ocean90
8 years ago

  • Keywords good-first-bug added

8 years ago

Code readability bug fixed

#2 @vrundakansara
8 years ago

  • Keywords has-patch added; needs-patch removed

#3 @ocean90
8 years ago

#38422 was marked as a duplicate.

8 years ago

#4 @aaroncampbell
8 years ago

Sorry, I had missed this. I added the patch from my duplicate ticket. The only difference is that the condition was just added to an existing if for the second replacement.

#5 @davidakennedy
8 years ago

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

In 38847:

Twenty Seventeen: Replace inline control structure to improve code readability

Props vrundakansara, aaroncampbell.

Fixes #38384.

#6 @SergeyBiryukov
8 years ago

Should this also be fixed in Twenty Sixteen? See twentysixteen_content_image_sizes_attr().

Note: See TracTickets for help on using tickets.