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

返回介绍

get_comment_statuses()

发布于 2017-09-10 字数1401 浏览 988 评论 0

get_comment_statuses()

Retrieve all of the WordPress supported comment statuses.


描述

Comments have a limited set of valid status values, this provides the comment status values and 描述s.


返回值

(array) List of comment statuses.


源代码

File: wp-includes/comment.php

function get_comment_statuses() {
	$status = array(
		'hold'		=> __( 'Unapproved' ),
		'approve'	=> _x( 'Approved', 'comment status' ),
		'spam'		=> _x( 'Spam', 'comment status' ),
		'trash'		=> _x( 'Trash', 'comment status' ),
	);

	return $status;
}

更新日志

Version 描述
2.7.0 Introduced.

相关函数

Uses

  • wp-includes/l10n.php:
    __()
  • wp-includes/l10n.php:
    _x()

Used By

  • wp-includes/class-wp-xmlrpc-server.php:
    wp_xmlrpc_server::wp_editComment()
  • wp-includes/class-wp-xmlrpc-server.php:
    wp_xmlrpc_server::wp_getCommentStatusList()

User Contributed Notes

发布评论

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

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