[wp-trac] [WordPress Trac] #22923: add_meta_box() ignores $context='side' if $post_type = 'page' & $id is exactly 'myplugin_sectionid'

WordPress Trac noreply at wordpress.org
Thu Dec 13 19:23:03 UTC 2012


#22923: add_meta_box() ignores $context='side' if $post_type = 'page' & $id is
exactly 'myplugin_sectionid'
-----------------------------+--------------------------
 Reporter:  SavesEnergy      |       Type:  defect (bug)
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  General
  Version:  3.5              |   Severity:  minor
 Keywords:                   |
-----------------------------+--------------------------
 This one's so strange I can hardly believe it -- but it reproduces every
 time. Running latest public version of WP (3.5), fresh install (no added
 plugins) downloaded yesterday from http://wordpress.org/latest.zip, on a
 WAMP Server running Windows XP [though I don't see how that could be
 relevant here].

 Steps to reproduce:

  0. Start with WP install of http://wordpress.org/latest.zip (version from
 yesterday, not today, if any changes made)

  1. Create a new plugin. Fill in the code from
 http://codex.wordpress.org/Function_Reference/add_meta_box, first code
 sample under "Example".

  2. Change

 {{{
     add_meta_box(
         'myplugin_sectionid',
         __( 'My Post Section Title', 'myplugin_textdomain' ),
         'myplugin_inner_custom_box',
         'page'
     );
 }}}


 to


 {{{
     add_meta_box(
         'myplugin_sectionid',
         __( 'My Post Section Title', 'myplugin_textdomain' ),
         'myplugin_inner_custom_box',
         'page'
         'side'
     );
 }}}

  3. Load a new page. Dashboard > Pages > Add New.

 Expected results: "My Post Section" appears to the side.
 Actual results: "My Post Section" appears below the editing area (as if
 'side' was not supplied).

 The very strange particular is if I change 'myplugin_sectionid' to
 ANYTHING else -- say 'myplugin2_sectionid', it works correctly.

 Also, if I make the same change to the 'post' example instead of the
 'page' one, it works correctly. How bizarro is that?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22923>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list