| @@ -208,9 +208,9 @@ | ||
| 208 | 208 | } elseif ( PLL_ADMIN ) { |
| 209 | 209 | $class = 'PLL_Admin'; |
| 210 | 210 | } elseif ( self::is_rest_request() ) { |
| 211 | 211 | $class = 'PLL_REST_Request'; |
| 212 | - } elseif ( $model->get_languages_list() ) { | |
| 212 | + } elseif ( $model->get_languages_list() && empty( $_GET['deactivate-polylang'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification | |
| 213 | 213 | $class = 'PLL_Frontend'; |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | /** |
| @@ -236,9 +236,9 @@ | ||
| 236 | 236 | |
| 237 | 237 | require_once __DIR__ . '/api.php'; // Loads the API |
| 238 | 238 | |
| 239 | 239 | // Loads the modules. |
| 240 | - foreach ( glob( POLYLANG_DIR . '/modules/*/load.php', GLOB_NOSORT ) as $load_script ) { | |
| 240 | + foreach ( glob( POLYLANG_DIR . '/modules/*/load.php', GLOB_NOSORT ) as $load_script ) { // phpcs:ignore WordPressVIPMinimum.Variables.VariableAnalysis.UnusedVariable | |
| 241 | 241 | require_once $load_script; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingVariable |
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | $polylang->init(); |