Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #14134, comment 208


Ignore:
Timestamp:
03/04/2016 06:57:11 AM (8 years ago)
Author:
keraweb
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #14134, comment 208

    initial v1  
    11@ericlewis
    22
    3 I think I have found my problem and sollution as stated in the comment before.
     3I think I have found my problem and solution.
    44
    5 Changed code: starting from '''line 61''' in '''nav-menus.php'''
     5Changed code: starting from '''line 61''' in '''wp-admin/nav-menus.php'''
    66{{{#!php
    77<?php
     
    1919}}}
    2020
    21 The menu locations are associative arrays and the preg_match you've made ('#(.*)(?:\[(\d+)\])#') targeted only digits. Changed "d+" to "w+" to solve this.
    22 After that, if $matched[2] is a numeric I've still made it an integer.
     21The menu locations are associative arrays and the preg_match you've made ( '#(.*)(?:\[(\d+)\])#' ) targeted only digits. Changed "d+" to "w+" to solve this.
     22After that, if $matched[2] is a numeric I've still made it an integer like before with (int).
    2323
    24 With this changes both integers and strings can be used in array keys.
     24With these changes both integers and strings can be used as array keys.
    2525
    2626Can you please review this code? I really like to see this working 100% in the 4.5 release.