| @@ -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' ) ); |
| @@ -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 | |