user_can_edit_post_comments

函式
user_can_edit_post_comments ( $user_id, $post_id, $blog_id = 1 )
引數
  • (int) $user_id
    Required:
  • (int) $post_id
    Required:
  • (int) $blog_id Not Used
    Required:
    Default: 1
返回值
  • (bool) returns true if $user_id can edit $post_id's comments
相關
  • current_user_can()
定義位置
相關方法
user_can_delete_post_commentsuser_can_edit_postuser_can_edit_post_dateuser_can_set_post_dateuser_can_edit_user
引入
1.5.0
棄用
2.0.0

user_can_edit_post_comments: 這個鉤子用來確定使用者是否可以編輯文章上的評論。

使用者是否可以刪除一個文章。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function user_can_edit_post_comments($user_id, $post_id, $blog_id = 1) {
_deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
// Right now if one can edit a post, one can edit comments made on it.
return user_can_edit_post($user_id, $post_id, $blog_id);
}
function user_can_edit_post_comments($user_id, $post_id, $blog_id = 1) { _deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' ); // Right now if one can edit a post, one can edit comments made on it. return user_can_edit_post($user_id, $post_id, $blog_id); }
function user_can_edit_post_comments($user_id, $post_id, $blog_id = 1) {
	_deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );

	// Right now if one can edit a post, one can edit comments made on it.
	return user_can_edit_post($user_id, $post_id, $blog_id);
}

常見問題

FAQs
檢視更多 >