mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 14:50:29 +00:00
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:
+4
-2
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user