get_comment_statuses

函数
get_comment_statuses ( No parameters )
返回值
  • (string[]) List of comment status labels keyed by status.
定义位置
相关方法
wp_get_comment_statusget_comment_datewp_set_comment_statusget_comment_classget_post_statuses
引入
2.7.0
弃用
-

get_comment_statuses – 这个函数返回一个可用的评论状态的数组。它通常用于填充WordPress管理中的评论状态的下拉列表。

检索所有WordPress支持的评论状态。

评论有一组有限的有效状态值,这提供了评论的状态值和描述。

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;
}

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-05 16:32:56

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: