user_can_edit_post_comments

Whether user can delete a post.

Description

user_can_edit_post_comments( (int) $user_id, (int) $post_id, (int) $blog_id = 1 ); 

Parameters (3)

0. $user_id (int)
The user id.
1. $post_id (int)
The post id.
2. $blog_id — Optional. (int) => 1
The blog id.

Usage

  1. if ( !function_exists( 'user_can_edit_post_comments' ) ) { 
  2. require_once ABSPATH . WPINC . '/deprecated.php'; 
  3.  
  4. // The user id. 
  5. $user_id = -1; 
  6.  
  7. // The post id. 
  8. $post_id = -1; 
  9.  
  10. // The blog id. 
  11. $blog_id = 1; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = user_can_edit_post_comments($user_id, $post_id, $blog_id); 
  15.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/deprecated.php  
  1. function user_can_edit_post_comments($user_id, $post_id, $blog_id = 1) { 
  2. _deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' ); 
  3.  
  4. // right now if one can edit a post, one can edit comments made on it 
  5. return user_can_edit_post($user_id, $post_id, $blog_id);