get_archives() - WordPress 函数参考中文文档

返回介绍

get_archives()

发布于 2017-09-10 字数1992 浏览 923 评论 0

Warning: This function has been deprecated. Use wp_get_archives() instead.

get_archives( string $type = '',  string $limit = '',  string $format = 'html',  string $before = '',  string $after = '',  bool $show_post_count = false )

Retrieves a list of archives.


描述


参数

$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


返回值

(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 描述
2.1.0 Use wp_get_archives()
0.71 Introduced.

相关函数

Uses

  • wp-includes/general-template.php:
    wp_get_archives()
  • wp-includes/functions.php:
    _deprecated_function()

User Contributed Notes

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!