get_archives
Retrieves a list of archives.
Description
(string|null) get_archives( (string) $type = '', (string) $limit = '', (string) $format = 'html', (string) $before = '', (string) $after = '', (constant) $show_post_count = false );
Returns (string|null)
Parameters (6)
- 0. $type — Optional. (string) =>
''
- The type.
- 1. $limit — Optional. (string) =>
''
- The limit.
- 2. $format — Optional. (string) =>
'html'
- The format.
- 3. $before — Optional. (string) =>
''
- The before.
- 4. $after — Optional. (string) =>
''
- The after.
- 5. $show_post_count — Optional. (constant) =>
false
- The show post count.
Usage
if ( !function_exists( 'get_archives' ) ) { require_once ABSPATH . WPINC . '/deprecated.php'; } // The type. $type = ''; // The limit. $limit = ''; // The format. $format = 'html'; // The before. $before = ''; // The after. $after = ''; // The show post count. $show_post_count = false; // NOTICE! Understand what this does before running. $result = get_archives($type, $limit, $format, $before, $after, $show_post_count);
Defined (1)
The function is defined in the following location(s).
- /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);
- }