WordPress.org

Make WordPress Core

Ticket #15677: 15677.patch

File 15677.patch, 762 bytes (added by ocean90, 7 years ago)
  • src/wp-admin/options-general.php

     
    303303</tr>
    304304<?php do_settings_fields('general', 'default'); ?>
    305305<?php
     306        require( ABSPATH . 'wp-admin/includes/upgrade.php' );
    306307        $languages = get_available_languages();
     308        $api_languages = wp_get_available_translations_from_api();
     309
     310        array_push( $languages, '-----------' ); // Separator for local and remote languages
     311        foreach ( $api_languages as $api_language ) {
     312                if ( ! in_array( $api_language['language'], $languages ) ) {
     313                        array_push( $languages, $api_language['language'] );
     314                }
     315        }
     316
    307317        if ( $languages ) :
    308318?>
    309319        <tr>