Make WordPress Core


Ignore:
Timestamp:
02/09/2006 10:03:48 AM (19 years ago)
Author:
ryan
Message:

Allow draft pages. Use post_type for object types. Reserve post_status strictly for status. fixes #1820

File:
1 edited

Legend:

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

    r3473 r3510  
    2424
    2525// Fix submenu highlighting for pages.
    26 if ( isset($_REQUEST['post']) && 'static' == get_post_status($_REQUEST['post']) )
     26if ( isset($_REQUEST['post']) && 'page' == get_post_type($_REQUEST['post']) )
    2727    $submenu_file = 'page-new.php';
    2828
     
    5151    }
    5252
    53     if ( 'static' == $_POST['post_status'] )
     53    if ( 'page' == $_POST['post_type'] )
    5454        $location = "page-new.php?saved=true";
    5555
     
    7373    $post = get_post_to_edit($post_ID);
    7474   
    75     if ($post->post_status == 'static')
     75    if ($post->post_type == 'page')
    7676        include('edit-page-form.php');
    7777    else
     
    9191    // Don't let these be changed
    9292    unset($_POST['guid']);
    93     $_POST['post_status'] = 'attachment';
     93    $_POST['post_type'] = 'attachment';
    9494
    9595    // Update the thumbnail filename
     
    135135        die( __('You are not allowed to delete this post.') );
    136136
    137     if ( $post->post_status == 'attachment' ) {
     137    if ( $post->post_type == 'attachment' ) {
    138138        if ( ! wp_delete_attachment($post_id) )
    139139            die( __('Error in deleting...') );
Note: See TracChangeset for help on using the changeset viewer.