mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Docs: Fix incorrect type in translations_api
and translations_api_result
docblocks.
Before this changeset, `translation_api` and `translation_api_result` filters were incorrectly marked as taking object as their first argument. The correct type is an array as `json_decode()` is asked to return an associative array. Props volodymyrkolesnykov. Fixes #54959. Built from https://develop.svn.wordpress.org/trunk@52645 git-svn-id: http://core.svn.wordpress.org/trunk@52234 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
66dc00211b
commit
b3d3adaa2b
@ -14,7 +14,7 @@
|
||||
*
|
||||
* @param string $type Type of translations. Accepts 'plugins', 'themes', 'core'.
|
||||
* @param array|object $args Translation API arguments. Optional.
|
||||
* @return object|WP_Error On success an object of translations, WP_Error on failure.
|
||||
* @return array|WP_Error On success an associative array of translations, WP_Error on failure.
|
||||
*/
|
||||
function translations_api( $type, $args = null ) {
|
||||
// Include an unmodified $wp_version.
|
||||
@ -29,9 +29,9 @@ function translations_api( $type, $args = null ) {
|
||||
*
|
||||
* @since 4.0.0
|
||||
*
|
||||
* @param false|object $result The result object. Default false.
|
||||
* @param string $type The type of translations being requested.
|
||||
* @param object $args Translation API arguments.
|
||||
* @param false|array $result The result array. Default false.
|
||||
* @param string $type The type of translations being requested.
|
||||
* @param object $args Translation API arguments.
|
||||
*/
|
||||
$res = apply_filters( 'translations_api', false, $type, $args );
|
||||
|
||||
@ -102,9 +102,9 @@ function translations_api( $type, $args = null ) {
|
||||
*
|
||||
* @since 4.0.0
|
||||
*
|
||||
* @param object|WP_Error $res Response object or WP_Error.
|
||||
* @param string $type The type of translations being requested.
|
||||
* @param object $args Translation API arguments.
|
||||
* @param array|WP_Error $res Response as an associative array or WP_Error.
|
||||
* @param string $type The type of translations being requested.
|
||||
* @param object $args Translation API arguments.
|
||||
*/
|
||||
return apply_filters( 'translations_api_result', $res, $type, $args );
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.0-alpha-52644';
|
||||
$wp_version = '6.0-alpha-52645';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user