Code Modernisation: Replace call_user_func_array()
in wp-admin/includes/ajax-actions.php
with a dynamic function call.
Props jrf. See #47678. git-svn-id: https://develop.svn.wordpress.org/trunk@46136 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e17d5accc3
commit
f16a56ca41
@ -1806,20 +1806,17 @@ function wp_ajax_menu_get_metabox() {
|
||||
|
||||
/** This filter is documented in wp-admin/includes/nav-menu.php */
|
||||
$item = apply_filters( 'nav_menu_meta_box_object', $menus_meta_box_object );
|
||||
ob_start();
|
||||
call_user_func_array(
|
||||
$callback,
|
||||
array(
|
||||
null,
|
||||
array(
|
||||
'id' => 'add-' . $item->name,
|
||||
'title' => $item->labels->name,
|
||||
'callback' => $callback,
|
||||
'args' => $item,
|
||||
),
|
||||
)
|
||||
|
||||
$box_args = array(
|
||||
'id' => 'add-' . $item->name,
|
||||
'title' => $item->labels->name,
|
||||
'callback' => $callback,
|
||||
'args' => $item,
|
||||
);
|
||||
|
||||
ob_start();
|
||||
$callback( null, $box_args );
|
||||
|
||||
$markup = ob_get_clean();
|
||||
|
||||
echo wp_json_encode(
|
||||
|
Loading…
Reference in New Issue
Block a user