Make WordPress Core

Opened 14 years ago

Closed 11 years ago

#22392 closed defect (bug) (wontfix)

save_state() in postbox.js should look at the hidden checkboxes instead of :hidden

Reported by: markoheijnen Owned by:
Priority: normal Milestone:
Component: Editor Version:
Severity: normal Keywords: has-patch
Cc: Focuses: javascript

Description

At this moment save_state() looks at all the metaboxes that are really hidden with filter(':hidden'). With can lead to weird behavior when a plugin starts to hide a metabox in some cases since it can be showed/hidden by default.

I was wondering if it is possible to look at the checkboxes and mapped them as a string and pass it to the AJAX action closed-postboxes.

Attachments (1)

22392.diff​ (606 bytes ) - added by markoheijnen 14 years ago.
Change hidden code

Download all attachments as: .zip

Change History (4)

@markoheijnen
14 years ago

Change hidden code

#1 @markoheijnen
14 years ago

  • Keywords has-patch added; needs-patch removed

#2 @adamsilverstein
13 years ago

  • Focuses javascript added
  • Keywords 2nd-opinion added

This patch concept looks fine and in my brief testing I verified that it is returning the same list of ids.

My only concern here would be that checkboxes may not always line up with the actual postboxes (although they should). Also, I'm not certain I understand the use case - you are hiding a metabox manually, but don't want it passed in the 'hidden' list?

#3 @chriscct7
11 years ago

  • Keywords dev-feedback 2nd-opinion removed
  • Milestone Awaiting Review
  • Resolution → wontfix
  • Status new → closed

I feel like at this point any plugin that was affected by this would have worked around this by now, and that the implementation of the proposed patch could actually break plugins. Further, I echo @adamsilversein's question about the use case for this. Closing as wontfix given afterformentioned and lack of further requests or activity in the last 2 years

Note: See TracTickets for help on using tickets.