Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-admin/includes
File: nav-menu.php
[1500] Fix | Delete
$messages[] = wp_get_admin_notice( $message, $notice_args );
[1501] Fix | Delete
[1502] Fix | Delete
unset( $menu_items, $unsorted_menu_items );
[1503] Fix | Delete
[1504] Fix | Delete
return $messages;
[1505] Fix | Delete
}
[1506] Fix | Delete
[1507] Fix | Delete
/**
[1508] Fix | Delete
* If a JSON blob of navigation menu data is in POST data, expand it and inject
[1509] Fix | Delete
* it into `$_POST` to avoid PHP `max_input_vars` limitations. See #14134.
[1510] Fix | Delete
*
[1511] Fix | Delete
* @ignore
[1512] Fix | Delete
* @since 4.5.3
[1513] Fix | Delete
* @access private
[1514] Fix | Delete
*/
[1515] Fix | Delete
function _wp_expand_nav_menu_post_data() {
[1516] Fix | Delete
if ( ! isset( $_POST['nav-menu-data'] ) ) {
[1517] Fix | Delete
return;
[1518] Fix | Delete
}
[1519] Fix | Delete
[1520] Fix | Delete
$data = json_decode( stripslashes( $_POST['nav-menu-data'] ) );
[1521] Fix | Delete
[1522] Fix | Delete
if ( ! is_null( $data ) && $data ) {
[1523] Fix | Delete
foreach ( $data as $post_input_data ) {
[1524] Fix | Delete
/*
[1525] Fix | Delete
* For input names that are arrays (e.g. `menu-item-db-id[3][4][5]`),
[1526] Fix | Delete
* derive the array path keys via regex and set the value in $_POST.
[1527] Fix | Delete
*/
[1528] Fix | Delete
preg_match( '#([^\[]*)(\[(.+)\])?#', $post_input_data->name, $matches );
[1529] Fix | Delete
[1530] Fix | Delete
$array_bits = array( $matches[1] );
[1531] Fix | Delete
[1532] Fix | Delete
if ( isset( $matches[3] ) ) {
[1533] Fix | Delete
$array_bits = array_merge( $array_bits, explode( '][', $matches[3] ) );
[1534] Fix | Delete
}
[1535] Fix | Delete
[1536] Fix | Delete
$new_post_data = array();
[1537] Fix | Delete
[1538] Fix | Delete
// Build the new array value from leaf to trunk.
[1539] Fix | Delete
for ( $i = count( $array_bits ) - 1; $i >= 0; $i-- ) {
[1540] Fix | Delete
if ( count( $array_bits ) - 1 === $i ) {
[1541] Fix | Delete
$new_post_data[ $array_bits[ $i ] ] = wp_slash( $post_input_data->value );
[1542] Fix | Delete
} else {
[1543] Fix | Delete
$new_post_data = array( $array_bits[ $i ] => $new_post_data );
[1544] Fix | Delete
}
[1545] Fix | Delete
}
[1546] Fix | Delete
[1547] Fix | Delete
$_POST = array_replace_recursive( $_POST, $new_post_data );
[1548] Fix | Delete
}
[1549] Fix | Delete
}
[1550] Fix | Delete
}
[1551] Fix | Delete
[1552] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function