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

git-svn-id: https://develop.svn.wordpress.org/trunk@4780 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2007-01-22 08:16:58 +00:00
parent 81ccfa17f6
commit ff46d95c6c
2 changed files with 12 additions and 0 deletions

View File

@ -44,6 +44,12 @@ case 'edit':
$editing = true;
$page_ID = $post_ID = $p = (int) $_GET['post'];
$post = get_post_to_edit($page_ID);
if ( 'post' == $post->post_type ) {
wp_redirect("post.php?action=edit&post=$post_ID");
exit();
}
if($post->post_status == 'draft') {
wp_enqueue_script('prototype');
wp_enqueue_script('autosave');

View File

@ -47,6 +47,12 @@ case 'edit':
$editing = true;
$post_ID = $p = (int) $_GET['post'];
$post = get_post($post_ID);
if ( 'page' == $post->post_type ) {
wp_redirect("page.php?action=edit&post=$post_ID");
exit();
}
if($post->post_status == 'draft') {
wp_enqueue_script('prototype');
wp_enqueue_script('autosave');