Make WordPress Core

Changeset 4780


Ignore:
Timestamp:
01/22/2007 08:16:58 AM (18 years ago)
Author:
ryan
Message:

Don't allow editing pages via post.php. Redirect to page.php

Location:
trunk/wp-admin
Files:
2 edited

Legend:

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

    r4656 r4780  
    4545    $page_ID = $post_ID = $p = (int) $_GET['post'];
    4646    $post = get_post_to_edit($page_ID);
     47
     48    if ( 'post' == $post->post_type ) {
     49        wp_redirect("post.php?action=edit&post=$post_ID");
     50        exit();
     51    }
     52
    4753    if($post->post_status == 'draft') {
    4854        wp_enqueue_script('prototype');
  • trunk/wp-admin/post.php

    r4656 r4780  
    4848    $post_ID = $p = (int) $_GET['post'];
    4949    $post = get_post($post_ID);
     50   
     51    if ( 'page' == $post->post_type ) {
     52        wp_redirect("page.php?action=edit&post=$post_ID");
     53        exit();
     54    }
     55
    5056    if($post->post_status == 'draft') {
    5157        wp_enqueue_script('prototype');
Note: See TracChangeset for help on using the changeset viewer.