Capabilities: When creating an auto-draft, ensure that the current user still has permission to do so.

git-svn-id: https://develop.svn.wordpress.org/trunk@33357 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast
2015-07-22 04:01:53 +00:00
parent 2533d76203
commit 7439dd7354
4 changed files with 20 additions and 3 deletions
+4
View File
@@ -442,6 +442,10 @@ function wp_network_dashboard_right_now() {
function wp_dashboard_quick_press( $error_msg = false ) {
global $post_ID;
if ( ! current_user_can( 'edit_posts' ) ) {
return;
}
/* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
$last_post_id = (int) get_user_option( 'dashboard_quick_press_last_post_id' ); // Get the last post_ID
if ( $last_post_id ) {