[wp-trac] [WordPress Trac] #45206: Logic error in do_meta_boxes() for Gutenberg support

WordPress Trac noreply at wordpress.org
Sun Oct 28 17:21:51 UTC 2018


#45206: Logic error in do_meta_boxes() for Gutenberg support
--------------------------------+---------------------
 Reporter:  johnjamesjacoby     |       Owner:  (none)
     Type:  defect (bug)        |      Status:  new
 Priority:  normal              |   Milestone:  5.0
Component:  Options, Meta APIs  |     Version:  5.0
 Severity:  normal              |  Resolution:
 Keywords:                      |     Focuses:
--------------------------------+---------------------

Comment (by birgire):

 Replying to [comment:10 johnjamesjacoby]:
 > @birgire let’s assume the bitwise operator is correct, but it might be a
 good idea to document it in the code as such. They aren’t popular, and I
 have a hunch you won’t be the last person to question it.

 Sounds like a good idea. Even though I've occasionally worked with bitwise
 operators, it's application in this context here didn't turn on the light
 bulb :-)

 I also wonder if the {{{add_meta_box()}}} documentation should be
 adjusted, regarding the support for the {{{$callback_args}}} input type.

 Currently it's documented as {{{@param array}}}:

 https://core.trac.wordpress.org/browser/tags/4.9.8/src/wp-
 admin/includes/template.php#L923

 but as you noted, your ''WP User Profiles'' plugin is using an
 {{{WP_User}}} object:

 https://plugins.trac.wordpress.org/browser/wp-user-profiles/trunk/wp-user-
 profiles/includes/metaboxes.php#L51


 {{{
 // Register the "Status" side meta box
 add_meta_box(
     'submitdiv',
     _x( 'Status', 'users user-admin edit screen', 'wp-user-profiles' ),
     'wp_user_profiles_status_metabox',
     $hook,
     'side',
     'high',
     $user
 );

 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45206#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list