Title: user_can_edit_post_date
Published: April 25, 2014
Last modified: April 28, 2025

---

# user_can_edit_post_date( int $user_id, int $post_id, int $blog_id = 1 ): bool

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/user_can_edit_post_date/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/functions/user_can_edit_post_date/?output_format=md#see-also)
 * [Parameters](https://developer.wordpress.org/reference/functions/user_can_edit_post_date/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/user_can_edit_post_date/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/user_can_edit_post_date/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/user_can_edit_post_date/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/user_can_edit_post_date/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/user_can_edit_post_date/?output_format=md#wp--skip-link--target)

This function has been deprecated since 2.0.0. Use [current_user_can()](https://developer.wordpress.org/reference/functions/current_user_can/)
instead.

Whether user can delete a post.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/user_can_edit_post_date/?output_format=md#description)󠁿

### 󠀁[See also](https://developer.wordpress.org/reference/functions/user_can_edit_post_date/?output_format=md#see-also)󠁿

 * [current_user_can()](https://developer.wordpress.org/reference/functions/current_user_can/)

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/user_can_edit_post_date/?output_format=md#parameters)󠁿

 `$user_id`intrequired

`$post_id`intrequired

`$blog_id`intoptional

Not Used

Default:`1`

## 󠀁[Return](https://developer.wordpress.org/reference/functions/user_can_edit_post_date/?output_format=md#return)󠁿

 bool returns true if $user_id can edit $post_id’s date

## 󠀁[Source](https://developer.wordpress.org/reference/functions/user_can_edit_post_date/?output_format=md#source)󠁿

    ```php
    function user_can_edit_post_date($user_id, $post_id, $blog_id = 1) {
    	_deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );

    	$author_data = get_userdata($user_id);
    	return (($author_data->user_level > 4) && user_can_edit_post($user_id, $post_id, $blog_id));
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/deprecated.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/deprecated.php#L310)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/deprecated.php#L310-L315)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/user_can_edit_post_date/?output_format=md#related)󠁿

| Uses | Description | 
| [user_can_edit_post()](https://developer.wordpress.org/reference/functions/user_can_edit_post/)`wp-includes/deprecated.php` |

Whether user can edit a post.

  | 
| [get_userdata()](https://developer.wordpress.org/reference/functions/get_userdata/)`wp-includes/pluggable.php` |

Retrieves user info by user ID.

  | 
| [_deprecated_function()](https://developer.wordpress.org/reference/functions/_deprecated_function/)`wp-includes/functions.php` |

Marks a function as deprecated and inform when it has been used.

  |

[Show 1 more](https://developer.wordpress.org/reference/functions/user_can_edit_post_date/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/user_can_edit_post_date/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/user_can_edit_post_date/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.0.0](https://developer.wordpress.org/reference/since/2.0.0/) | Deprecated. Use [current_user_can()](https://developer.wordpress.org/reference/functions/current_user_can/)  | 
| [1.5.0](https://developer.wordpress.org/reference/since/1.5.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fuser_can_edit_post_date%2F)
before being able to contribute a note or feedback.