[wp-trac] [WordPress Trac] #34169: function do_meta_box with custom meta and some sorted fields
WordPress Trac
noreply at wordpress.org
Tue Oct 6 15:16:34 UTC 2015
#34169: function do_meta_box with custom meta and some sorted fields
-------------------------------+-----------------------------
Reporter: toblivar | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: 4.1.3
Severity: normal | Keywords:
Focuses: |
-------------------------------+-----------------------------
While developing a plugin with a custom meta field inside a custom post
type, (created using add_meta_box() ) and then trying to tap into
edit_form_after_title, it wasn't moving the custom meta field. Upon
further investigation I noticed in function do_meta_boxes the code to pull
the sorted ones out of their previous context apparently causes the
removal of any that have not been sorted.
before sorted code:
var_dump( $wp_meta_boxes[ $page ][ $context ] );
{{{
array (size=1)
'high' =>
array (size=1)
'company-region' =>
array (size=4)
'id' => string 'company-region' (length=14)
'title' => string 'Company Region' (length=14)
'callback' =>
array (size=2)
...
'args' => null
}}}
After sorted code:
{{{
array (size=1)
'high' =>
array (size=0)
empty
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34169>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list