[wp-trac] [WordPress Trac] #33128: admin_menu not called when attachment form is loaded in a frame
WordPress Trac
noreply at wordpress.org
Sun Jul 26 12:03:04 UTC 2015
#33128: admin_menu not called when attachment form is loaded in a frame
--------------------------------+-----------------------------
Reporter: cvedovini | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 4.2.2
Severity: normal | Keywords:
Focuses: ui, administration |
--------------------------------+-----------------------------
I used to register attachment_fields_to_edit and attachment_fields_to_save
hooks during the admin_menu hook, and until recently it was working
without a problem
However, at some point the core changed and when the attachment form is
loaded in a frame, the admin_menu hooks are only executed when the page is
loaded the first time.
When changes to the custom fields are committed (via JS on focus change)
the page is posted and refreshed but admin_menu is not called again, thus
the fields simply disappear and are not saved.
Now I have to register those hooks during admin_init, which is fine,
however the behavior with admin_menu is not backward compatible and
inconsistent. It makes sense that admin_menu wouldn't be called at all
inside a frame, but the way it works now is confusing
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33128>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list