检索存档列表。
原型
get_archives( string $type = '', string $limit = '', string $format = 'html', string $before = '', string $after = '', bool $show_post_count = false )
参数
$type
(string)
(Optional)
$limit
(string)
(Optional)
$format
(string)
(Optional)
$before
(string)
(Optional)
$after
(string)
(Optional)
$show_post_count
(bool)
(Optional)
返回值
(string|null)
源文件
路径:wp-includes/deprecated.php
<?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);
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/get_archives/