Wordpress 4.6
[autoinstalls/wordpress.git] / wp-includes / customize / class-wp-customize-nav-menu-section.php
index fb5eb768911e47ab1b193620b58da7ff0f93e0d5..5518b34705dedc4d4e67a9361e4f9995a31af70d 100644 (file)
@@ -36,7 +36,7 @@ class WP_Customize_Nav_Menu_Section extends WP_Customize_Section {
         */
        public function json() {
                $exported = parent::json();
-               $exported['menu_id'] = intval( preg_replace( '/^nav_menu\[(\d+)\]/', '$1', $this->id ) );
+               $exported['menu_id'] = intval( preg_replace( '/^nav_menu\[(-?\d+)\]/', '$1', $this->id ) );
 
                return $exported;
        }