Make WordPress Core

Opened 4 years ago

Closed 2 years ago

Last modified 2 years ago

#18829 closed defect (bug) (maybelater)

Cleanup of postbox_classes

Reported by: logikal16 Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.2.1
Component: Template Keywords: has-patch
Focuses: Cc:


When using add_meta_box, this patch fixes the extra spaces in the meta box CSS class attribute.

This patch cleans up the postbox_classes function.

Attachments (1)

post.php.patch (1000 bytes) - added by logikal16 4 years ago.

Download all attachments as: .zip

Change History (9)

4 years ago

#1 @ocean90
4 years ago

  • Keywords needs-testing added
  • Summary changed from [PATCH] Cleanup of postbox_classes to Cleanup of postbox_classes

#2 @nacin
4 years ago

I'm not sure why some code here has been removed. What about the $_GET['edit'] checks?

It'd be easier if we just imploded and trim() at the end, and convert those kind-of empty arrays to array().

#3 @logikal16
4 years ago

@nacin - Look at the code more closely. The line with $_GETedit? is useless. It sets $classes to a 1-element array (which the code does in 3 other instances).

It'd be easier to set the default value as an empty array, then add more classes as needed (as the patch provides).

#4 @logikal16
4 years ago

Any updates?

#5 @c3mdigital
2 years ago

  • Keywords close added; has-patch needs-testing removed
  • Resolution set to maybelater
  • Status changed from new to closed

#6 @ocean90
2 years ago

  • Milestone Awaiting Review deleted

#7 @ocean90
2 years ago

  • Keywords close removed

#8 @SergeyBiryukov
2 years ago

  • Keywords has-patch added
Note: See TracTickets for help on using tickets.