Make WordPress Core


Ignore:
Timestamp:
02/10/2016 02:10:17 PM (10 years ago)
Author:
ericlewis
Message:

Menus: Revert larger menu support in Edit Menus screen in [36506].

JSON encoding the form as it exists on the page will not scale.

See #14134.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/nav-menus.php

    r36506 r36507  
    4949// Allowed actions: add, update, delete
    5050$action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : 'edit';
    51 
    52 /*
    53  * If a JSON blob of navigation menu data is found, expand it and inject it
    54  * into `$_POST` to avoid PHP `max_input_vars` limitations. See #14134.
    55  */
    56 if ( isset( $_POST['nav-menu-data'] ) ) {
    57     $data = json_decode( stripslashes( $_POST['nav-menu-data'] ) );
    58     if ( ! is_null( $data ) && $data ) {
    59         foreach ( $data as $post_var => $post_data ) {
    60             $_POST[$post_var] = $post_data;
    61         }
    62     }
    63 }
    6451
    6552switch ( $action ) {
     
    745732            <form id="update-nav-menu" method="post" enctype="multipart/form-data">
    746733                <div class="menu-edit <?php if ( $add_new_screen ) echo 'blank-slate'; ?>">
    747                     <input type="hidden" name="nav-menu-data">
    748734                    <?php
    749735                    wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
Note: See TracChangeset for help on using the changeset viewer.