From 0fb4304628b460fb246d6a64f5f88a7413f18715 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Sun, 18 Oct 2015 15:34:55 +0000 Subject: [PATCH] Taxonomy: Improve deprecated argument strings for the 'link' type in `get_categories()` and `wp_dropdown_categories()`. Props swissspidy, gagan0123. Fixes #34318. git-svn-id: https://develop.svn.wordpress.org/trunk@35264 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/category-functions.php | 8 +++++++- src/wp-includes/category-template.php | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/category-functions.php b/src/wp-includes/category-functions.php index 325264b3ca..905aa928c1 100644 --- a/src/wp-includes/category-functions.php +++ b/src/wp-includes/category-functions.php @@ -39,7 +39,13 @@ function get_categories( $args = '' ) { // Back compat if ( isset($args['type']) && 'link' == $args['type'] ) { - _deprecated_argument( __FUNCTION__, '3.0', '' ); + /* translators: 1: "type => link", 2: "taxonomy => link_category" alternative */ + _deprecated_argument( __FUNCTION__, '3.0', + sprintf( __( '%1$s is deprecated. Use %2$s instead.' ), + 'type => link', + 'taxonomy => link_category' + ) + ); $taxonomy = $args['taxonomy'] = 'link_category'; } diff --git a/src/wp-includes/category-template.php b/src/wp-includes/category-template.php index 471def6c17..387e84e9aa 100644 --- a/src/wp-includes/category-template.php +++ b/src/wp-includes/category-template.php @@ -373,7 +373,13 @@ function wp_dropdown_categories( $args = '' ) { // Back compat. if ( isset( $args['type'] ) && 'link' == $args['type'] ) { - _deprecated_argument( __FUNCTION__, '3.0', '' ); + /* translators: 1: "type => link", 2: "taxonomy => link_category" alternative */ + _deprecated_argument( __FUNCTION__, '3.0', + sprintf( __( '%1$s is deprecated. Use %2$s instead.' ), + 'type => link', + 'taxonomy => link_category' + ) + ); $args['taxonomy'] = 'link_category'; }