post_status == 'draft') { wp_enqueue_script('prototype'); wp_enqueue_script('autosave'); } require_once('admin-header.php'); if ( !current_user_can('edit_page', $page_ID) ) die ( __('You are not allowed to edit this page.') ); include('edit-page-form.php'); ?>
post_type == 'attachment' ) { if ( ! wp_delete_attachment($page_id) ) wp_die( __('Error in deleting...') ); } else { if ( !wp_delete_post($page_id) ) wp_die( __('Error in deleting...') ); } $sendback = wp_get_referer(); if (strstr($sendback, 'page.php')) $sendback = get_settings('siteurl') .'/wp-admin/page.php'; elseif (strstr($sendback, 'attachments.php')) $sendback = get_settings('siteurl') .'/wp-admin/attachments.php'; $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback); wp_redirect($sendback); exit(); break; default: wp_redirect('edit-pages.php'); exit(); break; } // end switch include('admin-footer.php'); ?>