Warning: This function has been deprecated. Use wp_get_archives() instead.
get_archives() WordPress Function
The get_archives() function is a WordPress function that retrieves a list of archive files from the specified folder. It includes the current month, year, and day as well as any other archive files that may be present in the specified folder.
get_archives( string $type = '', string $limit = '', string $format = 'html', string $before = '', string $after = '', bool $show_post_count = false ) #
Retrieves a list of archives.
Description
See also
Parameters
- $type
(string)(Optional)
Default value: ''
- $limit
(string)(Optional)
Default value: ''
- $format
(string)(Optional)
Default value: 'html'
- $before
(string)(Optional)
Default value: ''
- $after
(string)(Optional)
Default value: ''
- $show_post_count
(bool)(Optional)
Default value: false
Return
(string|null)
Source
File: wp-includes/deprecated.php
function get_archives($type='', $limit='', $format='html', $before = '', $after = '', $show_post_count = false) { _deprecated_function( __FUNCTION__, '2.1.0', 'wp_get_archives()' ); $args = compact('type', 'limit', 'format', 'before', 'after', 'show_post_count'); return wp_get_archives($args); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.1.0 | Use wp_get_archives() |
0.71 | Introduced. |