[wp-trac] [WordPress Trac] #40863: WP 4.7.5 XMLRPC new method for parsing arguments omits menu_order

WordPress Trac noreply at wordpress.org
Thu May 25 15:35:23 UTC 2017


#40863: WP 4.7.5 XMLRPC new method for parsing arguments omits menu_order
--------------------------+-----------------------------
 Reporter:  bjminihan     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  XML-RPC       |    Version:  4.7.5
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 In WP 4.7.5, in wp-includes/class-wp-xmlrpc-server.php, on line 1327, this
 line:

 {{{
 $post_data = wp_parse_args( $content_struct, $defaults );
 }}}

 was changed to:

 {{{
 $post_data = wp_parse_args( array_intersect_key( $content_struct,
 $defaults ), $defaults );
 }}}

 Unfortunately, the new intersection strips out any arguments from
 $content_struct that don't exist in $defaults.

 So you can no longer edit a post and change the "menu_order" field,
 because it doesn't exist in the $defaults declared just before this line.

 Please provide either an updated list of acceptable defaults (e.g.
 including menu fields), or allow for additional fields to pass through to
 wp_parse_args.

 Tested with latest version of WP, and confirmed that swapping the changed
 line above enables/disables the ability to change menu_order in posts.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40863>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list