From 17061829e4695b7654b72c2f14b28cc09f0ee41e Mon Sep 17 00:00:00 2001 From: Rachel Baker Date: Wed, 9 Dec 2015 21:26:29 +0000 Subject: [PATCH] Docs: Better param descriptions and fix incorrect param name within REST API deprecated functions `rest_handle_deprecated_function`: you get better parameter descriptions. `rest_handle_deprecated_argument`: you get a corrected parameter name ($replacement->$message), appropriate i18n translation hints, and better parameter descriptions. Props ocean90. Fixes #34908 Built from https://develop.svn.wordpress.org/trunk@35845 git-svn-id: http://core.svn.wordpress.org/trunk@35809 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/rest-api.php | 16 ++++++++-------- wp-includes/version.php | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/wp-includes/rest-api.php b/wp-includes/rest-api.php index 29cac58fa6..c0a492482b 100644 --- a/wp-includes/rest-api.php +++ b/wp-includes/rest-api.php @@ -324,8 +324,8 @@ function rest_ensure_response( $response ) { * * @since 4.4.0 * - * @param string $function Function name. - * @param string $replacement Replacement function name. + * @param string $function The function that was called. + * @param string $replacement The function that should have been called. * @param string $version Version. */ function rest_handle_deprecated_function( $function, $replacement, $version ) { @@ -345,14 +345,14 @@ function rest_handle_deprecated_function( $function, $replacement, $version ) { * * @since 4.4.0 * - * @param string $function Function name. - * @param string $replacement Replacement function name. + * @param string $function The function that was called. + * @param string $message A message regarding the change. * @param string $version Version. */ -function rest_handle_deprecated_argument( $function, $replacement, $version ) { - if ( ! empty( $replacement ) ) { - /* translators: 1: function name, 2: WordPress version number, 3: new argument name */ - $string = sprintf( __( '%1$s (since %2$s; %3$s)' ), $function, $version, $replacement ); +function rest_handle_deprecated_argument( $function, $message, $version ) { + if ( ! empty( $message ) ) { + /* translators: 1: function name, 2: WordPress version number, 3: error message */ + $string = sprintf( __( '%1$s (since %2$s; %3$s)' ), $function, $version, $message ); } else { /* translators: 1: function name, 2: WordPress version number */ $string = sprintf( __( '%1$s (since %2$s; no alternative available)' ), $function, $version ); diff --git a/wp-includes/version.php b/wp-includes/version.php index df3ad3610b..47d2b19bd1 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-alpha-35844'; +$wp_version = '4.5-alpha-35845'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.