Opened 15 years ago
Closed 15 years ago
#12439 closed defect (bug) (fixed)
Metaboxes options ignored
Reported by: | scribu | Owned by: | |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | major | Version: | 3.0 |
Component: | Administration | Keywords: | has-patch tested commit |
Focuses: | Cc: |
Description
Steps to reproduce
On any admin page with meta boxes:
- Open Screen Options.
- Uncheck one of the metabox titles, to hide it.
- Refresh page.
Expected result
Box stays hidden.
Actual result
Hidden metaboxes are reset to default values.
Attachments (4)
Change History (15)
#2
@
15 years ago
- Keywords has-patch added; needs-patch removed
The problem was that get_user_option() first looks for blog-specific options, but the AJAX calls updated the user-specific options.
12439.diff fixes this.
#3
@
15 years ago
12439.2.diff uses update_user_option(), making it compatible with get_user_option().
12439.3.diff takes a more "radical" approach and removes the $option = preg_replace('|[^a-z0-9_]|i', '', $option);
filter. It has the short-term drawback that users will loose their customizations when upgrading.
#5
@
15 years ago
- Keywords tested removed
scratch that, its working on the dashboard and built in edit pages, but not on custom post_type pages.
I've traced the error to get_hidden_meta_boxes() -> get_user_option().