Taxonomy: Improve deprecated argument strings for the 'link' type in `get_categories()` and `wp_dropdown_categories()`.
Props swissspidy, gagan0123. Fixes #34318. Built from https://develop.svn.wordpress.org/trunk@35264 git-svn-id: http://core.svn.wordpress.org/trunk@35230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b37bb95aad
commit
2e11f8cc16
|
@ -39,7 +39,13 @@ function get_categories( $args = '' ) {
|
||||||
|
|
||||||
// Back compat
|
// Back compat
|
||||||
if ( isset($args['type']) && 'link' == $args['type'] ) {
|
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.' ),
|
||||||
|
'<code>type => link</code>',
|
||||||
|
'<code>taxonomy => link_category</code>'
|
||||||
|
)
|
||||||
|
);
|
||||||
$taxonomy = $args['taxonomy'] = 'link_category';
|
$taxonomy = $args['taxonomy'] = 'link_category';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -373,7 +373,13 @@ function wp_dropdown_categories( $args = '' ) {
|
||||||
|
|
||||||
// Back compat.
|
// Back compat.
|
||||||
if ( isset( $args['type'] ) && 'link' == $args['type'] ) {
|
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.' ),
|
||||||
|
'<code>type => link</code>',
|
||||||
|
'<code>taxonomy => link_category</code>'
|
||||||
|
)
|
||||||
|
);
|
||||||
$args['taxonomy'] = 'link_category';
|
$args['taxonomy'] = 'link_category';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.4-alpha-35263';
|
$wp_version = '4.4-alpha-35264';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue