函数原型
get_archives( string $type = ”, string $limit = ”, string $format = ‘html’, string $before = ”, string $after = ”, bool $show_post_count = false ): string|null
函数描述
Retrieves a list of archives.
是否弃用
Warning: This function has been deprecated. Use wp_get_archives() instead.
函数参数
-
$type
string
Optional Default:
''-
$limit
string
Optional Default:
''-
$format
string
Optional Default:
'html'-
$before
string
Optional Default:
''-
$after
string
Optional Default:
''-
$show_post_count
bool
Optional Default:
false
函数返回值
string|null
函数位置
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);
}
源码链接
变更日志
| Version | Description |
|---|---|
| 2.1.0 | Use wp_get_archives() |
| 0.71 | Introduced. |

