On this page
wp_list_cats( string|array $args = '' ): null|string|false
This function has been deprecated. Use wp_list_categories() instead.
Lists categories.
Description
See also
Parameters
$argsstring|array Optional-
Default:
''
Return
null|string|false
Source
File: wp-includes/deprecated.php. View all references
function wp_list_cats($args = '') {
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_categories()' );
$parsed_args = wp_parse_args( $args );
// Map to new names.
if ( isset($parsed_args['optionall']) && isset($parsed_args['all']))
$parsed_args['show_option_all'] = $parsed_args['all'];
if ( isset($parsed_args['sort_column']) )
$parsed_args['orderby'] = $parsed_args['sort_column'];
if ( isset($parsed_args['sort_order']) )
$parsed_args['order'] = $parsed_args['sort_order'];
if ( isset($parsed_args['optiondates']) )
$parsed_args['show_last_update'] = $parsed_args['optiondates'];
if ( isset($parsed_args['optioncount']) )
$parsed_args['show_count'] = $parsed_args['optioncount'];
if ( isset($parsed_args['list']) )
$parsed_args['style'] = $parsed_args['list'] ? 'list' : 'break';
$parsed_args['title_li'] = '';
return wp_list_categories($parsed_args);
}
Related
Uses
| Uses | Description |
|---|---|
| wp_list_categories() wp-includes/category-template.php | Displays or retrieves the HTML list of categories. |
| _deprecated_function() wp-includes/functions.php | Marks a function as deprecated and inform when it has been used. |
| wp_parse_args() wp-includes/functions.php | Merges user defined arguments into defaults array. |
Used By
| Used By | Description |
|---|---|
| list_cats() wp-includes/deprecated.php | Lists categories. |
Changelog
| Version | Description |
|---|---|
| 2.1.0 | Use wp_list_categories() |
| 1.2.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_list_cats