Pass locale to wordpress.org theme/plugin API.
In the future this will be used to return localized plugin/theme info. see #30735. Built from https://develop.svn.wordpress.org/trunk@30944 git-svn-id: http://core.svn.wordpress.org/trunk@30933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6f937df4e5
commit
eccd5a5eda
|
@ -28,11 +28,17 @@
|
||||||
*/
|
*/
|
||||||
function plugins_api($action, $args = null) {
|
function plugins_api($action, $args = null) {
|
||||||
|
|
||||||
if ( is_array($args) )
|
if ( is_array( $args ) ) {
|
||||||
$args = (object) $args;
|
$args = (object) $args;
|
||||||
|
}
|
||||||
|
|
||||||
if ( !isset($args->per_page) )
|
if ( ! isset( $args->per_page ) ) {
|
||||||
$args->per_page = 24;
|
$args->per_page = 24;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! isset( $args->locale ) ) {
|
||||||
|
$args->locale = get_locale();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the Plugin Install API arguments.
|
* Override the Plugin Install API arguments.
|
||||||
|
|
|
@ -316,11 +316,18 @@ function get_theme_feature_list( $api = true ) {
|
||||||
*/
|
*/
|
||||||
function themes_api( $action, $args = null ) {
|
function themes_api( $action, $args = null ) {
|
||||||
|
|
||||||
if ( is_array($args) )
|
if ( is_array( $args ) ) {
|
||||||
$args = (object) $args;
|
$args = (object) $args;
|
||||||
|
}
|
||||||
|
|
||||||
if ( !isset($args->per_page) )
|
if ( ! isset( $args->per_page ) ) {
|
||||||
$args->per_page = 24;
|
$args->per_page = 24;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! isset( $args->locale ) ) {
|
||||||
|
$args->locale = get_locale();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter arguments used to query for installer pages from the WordPress.org Themes API.
|
* Filter arguments used to query for installer pages from the WordPress.org Themes API.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue