diff --git a/wp-includes/author-template.php b/wp-includes/author-template.php
index 51ff8a97ae..89812324fa 100644
--- a/wp-includes/author-template.php
+++ b/wp-includes/author-template.php
@@ -41,10 +41,14 @@ function get_the_author($deprecated = '') {
* @link http://codex.wordpress.org/Template_Tags/the_author
*
* @param string $deprecated Deprecated.
- * @param string $deprecated_echo Echo the string or return it.
+ * @param string $deprecated_echo Deprecated. Use get_the_author(). Echo the string or return it.
* @return string The author's display name, from get_the_author().
*/
function the_author($deprecated = '', $deprecated_echo = true) {
+ if ( !empty($deprecated) )
+ _deprecated_argument(__FUNCTION__, 'deprecated', '1.5');
+ if ( $deprecated_echo !== true )
+ _deprecated_argument(__FUNCTION__, 'deprecated_echo', '1.5', __('Use get_the_author() instead if you do not want the value echoed.'));
if ( $deprecated_echo )
echo get_the_author();
return get_the_author();
@@ -177,6 +181,9 @@ function the_author_posts() {
* @param string $deprecated Deprecated.
*/
function the_author_posts_link($deprecated = '') {
+ if ( !empty( $deprecated ) )
+ _deprecated_argument(__FUNCTION__, 'deprecated', '0.0');
+
global $authordata;
$link = sprintf(
'%3$s',
diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php
index 321080afbf..95c28adc6a 100644
--- a/wp-includes/comment-template.php
+++ b/wp-includes/comment-template.php
@@ -503,10 +503,15 @@ function get_comments_link() {
*
* @since 0.71
*
- * @param string $deprecated Not Used
- * @param bool $deprecated Not Used
+ * @param string $deprecated_1 Not Used
+ * @param bool $deprecated_2 Not Used
*/
-function comments_link( $deprecated = '', $deprecated = '' ) {
+function comments_link( $deprecated_1 = '', $deprecated_2 = '' ) {
+ if ( !empty( $deprecated_1 ) )
+ _deprecated_argument(__FUNCTION__, 'deprecated_1', '0.0');
+ if ( !empty( $deprecated_2 ) )
+ _deprecated_argument(__FUNCTION__, 'deprecated_2', '0.0');
+
echo get_comments_link();
}
diff --git a/wp-includes/comment.php b/wp-includes/comment.php
index 285142eed9..3c35459c14 100644
--- a/wp-includes/comment.php
+++ b/wp-includes/comment.php
@@ -1511,7 +1511,9 @@ function wp_update_comment_count_now($post_id) {
* @param int $deprecated Not Used.
* @return bool|string False on failure, string containing URI on success.
*/
-function discover_pingback_server_uri($url, $deprecated = 2048) {
+function discover_pingback_server_uri($url, $deprecated = '') {
+ if ( !empty($deprecated) )
+ _deprecated_argument(__FUNCTION__, 'deprecated', '0.0');
$pingback_str_dquote = 'rel="pingback"';
$pingback_str_squote = 'rel=\'pingback\'';
diff --git a/wp-includes/cron.php b/wp-includes/cron.php
index b31e835658..3c7c086fe8 100644
--- a/wp-includes/cron.php
+++ b/wp-includes/cron.php
@@ -135,8 +135,10 @@ function wp_unschedule_event( $timestamp, $hook, $args = array() ) {
function wp_clear_scheduled_hook( $hook, $args = array() ) {
// Backward compatibility
// Previously this function took the arguments as discrete vars rather than an array like the rest of the API
- if ( !is_array($args) )
+ if ( !is_array($args) ) {
+ _deprecated_argument(__FUNCTION__, 'args', '3.0.0', __('This argument has changed to an array so as to match with the behaviour of all the other cron functions.') );
$args = array_slice( func_get_args(), 1 );
+ }
while ( $timestamp = wp_next_scheduled( $hook, $args ) )
wp_unschedule_event( $timestamp, $hook, $args );
diff --git a/wp-includes/functions.php b/wp-includes/functions.php
index 5db3f8021d..6cb67c97f3 100644
--- a/wp-includes/functions.php
+++ b/wp-includes/functions.php
@@ -3045,7 +3045,7 @@ function _deprecated_argument($function, $argument, $version, $message = null) {
// Allow plugin to filter the output error trigger
if( WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) {
- if( !is_null($replacement) )
+ if( !is_null($message) )
trigger_error( sprintf( __('The %1$s argument of %2$s is deprecated since version %3$s! %4$s'), $function, $argument, $version, $message ) );
else
trigger_error( sprintf( __('The %1$s argument of %2$s is deprecated since version %3$s with no alternative available.'), $function, $argument, $version ) );
diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php
index 91dbcd0006..c2c075b80e 100644
--- a/wp-includes/post-template.php
+++ b/wp-includes/post-template.php
@@ -246,6 +246,9 @@ function the_excerpt() {
* @return string
*/
function get_the_excerpt($deprecated = '') {
+ if ( !empty( $deprecated ) )
+ _deprecated_argument(__FUNCTION__, 'deprecated', '2.3');
+
global $post;
$output = $post->post_excerpt;
if ( post_password_required($post) ) {
diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php
index 47c0e6fcf5..9a29215c96 100644
--- a/wp-includes/widgets.php
+++ b/wp-includes/widgets.php
@@ -980,10 +980,13 @@ function is_active_sidebar( $index ) {
* @since 2.2.0
* @access private
*
- * @param bool $update Optional, deprecated.
+ * @param bool $deprecated. Not used.
* @return array Upgraded list of widgets to version 3 array format when called from the admin.
*/
function wp_get_sidebars_widgets($deprecated = true) {
+ if ( $deprecated !== true )
+ _deprecated_argument(__FUNCTION__, 'deprecated', '0.0');
+
global $wp_registered_widgets, $wp_registered_sidebars, $_wp_sidebars_widgets;
// If loading from front page, consult $_wp_sidebars_widgets rather than options