diff --git wordcamp.org/public_html/wp-content/mu-plugins/gutenberg-tweaks.php wordcamp.org/public_html/wp-content/mu-plugins/gutenberg-tweaks.php
index 9e947dfb..be8a4c35 100644
|
|
function add_classic_param_to_add_new_button() { |
84 | 84 | <script type="text/javascript"> |
85 | 85 | document.addEventListener( 'DOMContentLoaded', function() { |
86 | 86 | jQuery( '.split-page-title-action' ).children( 'a' ).each( function( index, element ) { |
87 | | jQuery( element ).attr( 'href', jQuery( element ).attr( 'href' ) + '&classic-editor' ); |
| 87 | var href = jQuery( element ).attr( 'href' ); |
| 88 | if ( href.match(/.php$/) ) { |
| 89 | jQuery( element ).attr( 'href', href + '?classic-editor' ); |
| 90 | } else { |
| 91 | jQuery( element ).attr( 'href', href + '&classic-editor' ); |
| 92 | } |
88 | 93 | } ); |
89 | 94 | } ); |
90 | 95 | </script> |