user_can_create_draft
Whether user can create a post.
Description
Parameters (3)
- 0. $user_id (int)
- The user id.
- 1. $blog_id — Optional. (int) =>
1
- The blog id.
- 2. $category_id — Optional. (string) =>
'None'
- The category id.
Usage
if ( !function_exists( 'user_can_create_draft' ) ) { require_once ABSPATH . WPINC . '/deprecated.php'; } // The user id. $user_id = -1; // The blog id. $blog_id = 1; // The category id. $category_id = 'None'; // NOTICE! Understand what this does before running. $result = user_can_create_draft($user_id, $blog_id, $category_id);
Defined (1)
The function is defined in the following location(s).
- /wp-includes/deprecated.php
- function user_can_create_draft($user_id, $blog_id = 1, $category_id = 'None') {
- _deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
- $author_data = get_userdata($user_id);
- return ($author_data->user_level >= 1);
- }