PluginProbe
Polylang / 2.8
Polylang v2.8
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
← All changes | settings/settings.php +3 -4 2.92.8 View file →
@@ -183,9 +183,9 @@
183 183 } else {
184 184 add_settings_error( 'general', 'pll_languages_created', __( 'Language added.', 'polylang' ), 'updated' );
185 185 $locale = sanitize_text_field( wp_unslash( $_POST['locale'] ) ); // phpcs:ignore WordPress.Security
186 186
187 - if ( 'en_US' !== $locale && current_user_can( 'install_languages' ) ) {
187 + if ( 'en_US' !== $locale ) {
188 188 // Attempts to install the language pack
189 189 require_once ABSPATH . 'wp-admin/includes/translation-install.php';
190 190 if ( ! wp_download_language_pack( $locale ) ) {
191 191 add_settings_error( 'general', 'pll_download_mo', __( 'The language was created, but the WordPress language file was not downloaded. Please install it manually.', 'polylang' ) );
@@ -304,9 +304,9 @@
304 304
305 305 // Handle user input
306 306 $action = isset( $_REQUEST['pll_action'] ) ? sanitize_key( $_REQUEST['pll_action'] ) : ''; // phpcs:ignore WordPress.Security.NonceVerification
307 307 if ( 'edit' === $action && ! empty( $_GET['lang'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
308 - // phpcs:ignore WordPress.Security.NonceVerification, VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
308 + // phpcs:ignore WordPress.Security.NonceVerification, WordPressVIPMinimum.Variables.VariableAnalysis.UnusedVariable
309 309 $edit_lang = $this->model->get_language( (int) $_GET['lang'] );
310 310 } else {
311 311 $this->handle_actions( $action );
312 312 }
@@ -324,9 +324,8 @@
324 324 $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
325 325
326 326 wp_enqueue_script( 'pll_admin', plugins_url( '/js/admin' . $suffix . '.js', POLYLANG_FILE ), array( 'jquery', 'wp-ajax-response', 'postbox', 'jquery-ui-selectmenu' ), POLYLANG_VERSION );
327 327 wp_localize_script( 'pll_admin', 'pll_flag_base_url', plugins_url( '/flags/', POLYLANG_FILE ) );
328 - wp_localize_script( 'pll_admin', 'pll_dismiss_notice', esc_html__( 'Dismiss this notice.', 'polylang' ) );
329 328
330 329 wp_enqueue_style( 'pll_selectmenu', plugins_url( '/css/selectmenu' . $suffix . '.css', POLYLANG_FILE ), array(), POLYLANG_VERSION );
331 330 }
332 331
@@ -386,9 +385,9 @@
386 385 * Filter the list of predefined languages
387 386 *
388 387 * @since 1.7.10
389 388 * @since 2.3 The languages arrays use associative keys instead of numerical keys
390 - * @see https://github.com/polylang/polylang/blob/2.8.2/settings/languages.php the list of predefined languages
389 + * @see settings/languages.php
391 390 *
392 391 * @param array $languages
393 392 */
394 393 $languages = apply_filters( 'pll_predefined_languages', $languages );