Pass locale to wordpress.org theme/plugin API.

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

see #30735.

git-svn-id: https://develop.svn.wordpress.org/trunk@30944 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90)
2014-12-16 22:38:52 +00:00
parent 6873e08839
commit 7560f4cf8c
2 changed files with 21 additions and 8 deletions
+9 -3
View File
@@ -28,11 +28,17 @@
*/
function plugins_api($action, $args = null) {
if ( is_array($args) )
$args = (object)$args;
if ( is_array( $args ) ) {
$args = (object) $args;
}
if ( !isset($args->per_page) )
if ( ! isset( $args->per_page ) ) {
$args->per_page = 24;
}
if ( ! isset( $args->locale ) ) {
$args->locale = get_locale();
}
/**
* Override the Plugin Install API arguments.