Changeset 56749
- Timestamp:
- 09/29/2023 09:37:06 PM (14 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-manager.php
r56748 r56749 2090 2090 <script> 2091 2091 ( function() { 2092 var urlParser, oldQueryParams, newQueryParams, i;2093 2092 if ( parent !== window ) { 2094 2093 return; 2095 2094 } 2096 urlParser = document.createElement( 'a' ); 2097 urlParser.href = location.href; 2098 oldQueryParams = urlParser.search.substr( 1 ).split( /&/ ); 2099 newQueryParams = []; 2100 for ( i = 0; i < oldQueryParams.length; i += 1 ) { 2101 if ( ! /^customize_messenger_channel=/.test( oldQueryParams[ i ] ) ) { 2102 newQueryParams.push( oldQueryParams[ i ] ); 2103 } 2104 } 2105 urlParser.search = newQueryParams.join( '&' ); 2106 if ( urlParser.search !== location.search ) { 2107 location.replace( urlParser.href ); 2095 const url = new URL( location.href ); 2096 if ( url.searchParams.has( 'customize_messenger_channel' ) ) { 2097 url.searchParams.delete( 'customize_messenger_channel' ); 2098 location.replace( url ); 2108 2099 } 2109 2100 } )();
Note: See TracChangeset
for help on using the changeset viewer.