Save as draft and continue editing feature.
git-svn-id: http://svn.automattic.com/wordpress/trunk@528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
567a609308
commit
f451503a81
|
@ -28,6 +28,7 @@ switch($action) {
|
|||
$form_trackback = '';
|
||||
}
|
||||
$colspan = 3;
|
||||
$saveasdraft = '<input name="save" type="submit" id="save" tabindex="6" value="Save and Continue Editing" />';
|
||||
break;
|
||||
case "edit":
|
||||
$submitbutton_text = 'Edit this!';
|
||||
|
@ -185,7 +186,7 @@ if ($use_quicktags) {
|
|||
<?php
|
||||
if ($use_quicktags) {
|
||||
?>
|
||||
<script language="JavaScript">
|
||||
<script type="text/javascript" language="JavaScript">
|
||||
<!--
|
||||
edCanvas = document.getElementById('content');
|
||||
//-->
|
||||
|
@ -210,7 +211,7 @@ if (get_settings('use_geo_positions')) {
|
|||
<?php echo $form_pingback ?>
|
||||
<?php echo $form_prevstatus ?>
|
||||
|
||||
<p><input type="submit" name="submit" value="<?php echo $submitbutton_text ?>" style="font-weight: bold;" tabindex="6" />
|
||||
<p><?php echo $saveasdraft; ?> <input type="submit" name="submit" value="<?php echo $submitbutton_text ?>" style="font-weight: bold;" tabindex="6" />
|
||||
<input name="referredby" type="hidden" id="referredby" value="<?php echo $HTTP_SERVER_VARS['HTTP_REFERER']; ?>" />
|
||||
</p>
|
||||
|
||||
|
|
|
@ -82,6 +82,8 @@ switch($action) {
|
|||
$now = date('Y-m-d H:i:s', (time() + ($time_difference * 3600)));
|
||||
}
|
||||
|
||||
if ('' != $HTTP_POST_VARS['save']) $post_status = 'draft';
|
||||
|
||||
if((get_settings('use_geo_positions')) && (strlen($latstr) > 2) && (strlen($lonstr) > 2) ) {
|
||||
$postquery ="INSERT INTO $tableposts
|
||||
(ID, post_author, post_date, post_content, post_title, post_category, post_lat, post_lon, post_excerpt, post_status, comment_status, ping_status, post_password, post_name)
|
||||
|
@ -145,6 +147,8 @@ switch($action) {
|
|||
} else {
|
||||
$location = 'wp-post.php';
|
||||
}
|
||||
|
||||
if ('' != $HTTP_POST_VARS['save']) $location = "wp-post.php?action=edit&post=$post_ID";
|
||||
header("Location: $location");
|
||||
exit();
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue