WordPress.org

Make WordPress Core

Changeset 26231


Ignore:
Timestamp:
11/15/2013 10:28:57 PM (8 years ago)
Author:
nacin
Message:

Revert these action blocks in wp-admin/post.php to their pre-[26144] state.

see #25824.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/post.php

    r26230 r26231  
    119119case 'postajaxpost':
    120120case 'post':
    121     // Check nonce and capabilities
    122     $nonce = $_REQUEST['_wpnonce'];
    123     $error_msg = false;
    124     if ( ! wp_verify_nonce( $nonce, 'add-post' ) )
    125         $error_msg = 'Unable to submit this form, please refresh and try again.';
    126 
    127     if ( ! current_user_can( 'edit_posts' ) )
    128         $error_msg = "Oops, you don't have access to add new drafts.";
    129 
     121    check_admin_referer( 'add-' . $post_type );
    130122    $post_id = 'postajaxpost' == $action ? edit_post() : write_post();
    131 
    132     redirect_post($post_id);
     123    redirect_post( $post_id );
    133124    exit();
    134125    break;
Note: See TracChangeset for help on using the changeset viewer.