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

git-svn-id: http://svn.automattic.com/wordpress/trunk@4780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-01-22 08:16:58 +00:00
parent 517790d375
commit d6287980ea
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');