[wp-trac] [WordPress Trac] #41488: Customize: uncaught JS error with namespaced nav menu fallbacks
WordPress Trac
noreply at wordpress.org
Tue Aug 1 03:45:00 UTC 2017
#41488: Customize: uncaught JS error with namespaced nav menu fallbacks
--------------------------+------------------
Reporter: dlh | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.9
Component: Customize | Version: 4.3
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+------------------
Comment (by westonruter):
@dlh hummm, you're right:
{{{
> echo preg_replace( '/(attr)/', '$1 ' . preg_quote( 'data-customize-
partial-id' ) , 'attr' );
< attr data\-customize\-partial\-id
}}}
OK, it seems the answer is right in the docs for `preg_replace`:
http://php.net/manual/en/function.preg-replace.php
> To use backslash in replacement, it must be doubled.
I've replaced `preg_quote()` with `str_replace()` in
[attachment:41488.4.diff].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41488#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list