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)

@logikal164 years ago

comment:1 @ocean904 years ago

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

comment:2 @nacin4 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().

comment:3 @logikal164 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).

comment:4 @logikal164 years ago

Any updates?

comment:5 @c3mdigital2 years ago

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

comment:6 @ocean902 years ago

  • Milestone Awaiting Review deleted

comment:7 @ocean902 years ago

  • Keywords close removed

comment:8 @SergeyBiryukov2 years ago

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