| @@ -142,23 +142,9 @@ | ||
| 142 | 142 | <script> |
| 143 | 143 | (function() { |
| 144 | 144 | var notice = document.getElementById('wpvr-ui-mode-notice'); |
| 145 | 145 | var dismissButton = notice ? notice.querySelector('.wpvr-ui-mode-notice__dismiss') : null; |
| 146 | - var switchButton = notice ? notice.querySelector('.wpvr-ui-mode-notice__switch') : null; | |
| 147 | 146 | |
| 148 | - if (switchButton) { | |
| 149 | - switchButton.addEventListener('click', function() { | |
| 150 | - // Publishing updates the page URL without rebuilding this notice. | |
| 151 | - var tourId = parseInt(new URLSearchParams(window.location.search).get('post'), 10); | |
| 152 | - if (tourId > 0) { | |
| 153 | - var switchUrl = new URL(switchButton.href); | |
| 154 | - switchUrl.searchParams.set('context', 'edit'); | |
| 155 | - switchUrl.searchParams.set('tour_id', tourId); | |
| 156 | - switchButton.href = switchUrl.toString(); | |
| 157 | - } | |
| 158 | - }); | |
| 159 | - } | |
| 160 | - | |
| 161 | 147 | if (dismissButton) { |
| 162 | 148 | dismissButton.addEventListener('click', function() { |
| 163 | 149 | notice.remove(); |
| 164 | 150 | }); |
| @@ -203,9 +189,9 @@ | ||
| 203 | 189 | return $screen->id === self::POST_TYPE; |
| 204 | 190 | } |
| 205 | 191 | |
| 206 | 192 | private function get_current_mode(): string { |
| 207 | - return get_option( 'wpvr_ui_mode', 'latest' ) === 'latest' ? 'latest' : 'legacy'; | |
| 193 | + return get_option( 'wpvr_ui_mode', 'legacy' ) === 'latest' ? 'latest' : 'legacy'; | |
| 208 | 194 | } |
| 209 | 195 | |
| 210 | 196 | private function get_current_context(): string { |
| 211 | 197 | if ( isset( $_GET['page'] ) && sanitize_key( $_GET['page'] ) === self::PAGE_SLUG ) { |