Improvements to the nonce AYS from mdawaffe. #2734

git-svn-id: https://develop.svn.wordpress.org/trunk@3783 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2006-05-18 06:49:22 +00:00
parent ab83e29c5c
commit 855864396f
6 changed files with 22 additions and 17 deletions
+4 -2
View File
@@ -1,6 +1,8 @@
<?php
require_once('admin.php');
$parent_file = 'edit.php';
$submenu_file = 'edit.php';
$wpvarstoreset = array('action', 'safe_mode', 'withcomments', 'posts', 'content', 'edited_post_title', 'comment_error', 'profile', 'trackback_url', 'excerpt', 'showcomments', 'commentstart', 'commentend', 'commentorder' );
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
@@ -24,6 +26,8 @@ if ( isset( $_POST['deletepost'] ) )
switch($action) {
case 'postajaxpost':
case 'post':
$parent_file = 'post-new.php';
$submenu_file = 'post-new.php';
check_admin_referer('add-post');
$post_ID = 'post' == $action ? write_post() : edit_post();
@@ -54,8 +58,6 @@ case 'post':
case 'edit':
$title = __('Edit');
$parent_file = 'edit.php';
$submenu_file = 'edit.php';
$editing = true;
require_once('admin-header.php');