Code Modernisation: Replace call_user_func_array() in wp-admin/includes/ajax-actions.php with a dynamic function call.

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46136


git-svn-id: http://core.svn.wordpress.org/trunk@45948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-09-15 11:34:57 +00:00
parent 4bcec84309
commit 7c370fa9d0
2 changed files with 10 additions and 13 deletions

View File

@ -1806,20 +1806,17 @@ function wp_ajax_menu_get_metabox() {
/** This filter is documented in wp-admin/includes/nav-menu.php */ /** This filter is documented in wp-admin/includes/nav-menu.php */
$item = apply_filters( 'nav_menu_meta_box_object', $menus_meta_box_object ); $item = apply_filters( 'nav_menu_meta_box_object', $menus_meta_box_object );
ob_start();
call_user_func_array( $box_args = array(
$callback, 'id' => 'add-' . $item->name,
array( 'title' => $item->labels->name,
null, 'callback' => $callback,
array( 'args' => $item,
'id' => 'add-' . $item->name,
'title' => $item->labels->name,
'callback' => $callback,
'args' => $item,
),
)
); );
ob_start();
$callback( null, $box_args );
$markup = ob_get_clean(); $markup = ob_get_clean();
echo wp_json_encode( echo wp_json_encode(

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.3-alpha-46135'; $wp_version = '5.3-alpha-46136';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.