Make WordPress Core


Ignore:
Timestamp:
12/16/2014 10:38:52 PM (10 years ago)
Author:
ocean90
Message:

Pass locale to wordpress.org theme/plugin API.

In the future this will be used to return localized plugin/theme info.

see #30735.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/plugin-install.php

    r30889 r30944  
    2929function plugins_api($action, $args = null) {
    3030
    31     if ( is_array($args) )
    32         $args = (object)$args;
    33 
    34     if ( !isset($args->per_page) )
     31    if ( is_array( $args ) ) {
     32        $args = (object) $args;
     33    }
     34
     35    if ( ! isset( $args->per_page ) ) {
    3536        $args->per_page = 24;
     37    }
     38
     39    if ( ! isset( $args->locale ) ) {
     40        $args->locale = get_locale();
     41    }
    3642
    3743    /**
Note: See TracChangeset for help on using the changeset viewer.