WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 8 months ago

Last modified 8 months 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:

Description

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 3 years ago.

Download all attachments as: .zip

Change History (9)

logikal163 years ago

comment:1 ocean903 years ago

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

comment:2 nacin3 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 logikal163 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 logikal162 years ago

Any updates?

comment:5 c3mdigital8 months ago

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

comment:6 ocean908 months ago

  • Milestone Awaiting Review deleted

comment:7 ocean908 months ago

  • Keywords close removed

comment:8 SergeyBiryukov8 months ago

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