Make WordPress Core


Ignore:
Timestamp:
09/20/2013 07:12:45 PM (8 years ago)
Author:
nacin
Message:

Send installed language data to the plugin and theme update-check endpoints.

Introduces wp_get_installed_language_data() and wp_get_pomo_file_data().

see #18200.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/update.php

    r25514 r25520  
    147147
    148148    $plugins = get_plugins();
     149    $languages = wp_get_installed_language_data( 'plugins' );
     150
    149151    $active  = get_option( 'active_plugins', array() );
    150152    $current = get_site_transient( 'update_plugins' );
     
    201203    $options = array(
    202204        'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3),
    203         'body' => array( 'plugins' => json_encode( $to_send ) ),
     205        'body' => array( 'plugins' => json_encode( $to_send ), 'languages' => json_encode( $languages ) ),
    204206        'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )
    205207    );
     
    244246
    245247    $installed_themes = wp_get_themes();
     248    $languages = wp_get_installed_language_data( 'themes' );
     249
    246250    $last_update = get_site_transient( 'update_themes' );
    247251    if ( ! is_object($last_update) )
     
    311315    $options = array(
    312316        'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3),
    313         'body'          => array( 'themes' => json_encode( $request ) ),
     317        'body'          => array( 'themes' => json_encode( $request ), 'languages' => json_encode( $languages ) ),
    314318        'user-agent'    => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )
    315319    );
Note: See TracChangeset for help on using the changeset viewer.