mirror of
git://develop.git.wordpress.org/
synced 2025-01-18 05:18:42 +01:00
Redirect to edit page with posted blurb as default.
git-svn-id: https://develop.svn.wordpress.org/trunk@6581 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3e8cb53029
commit
9b9c8bd46f
@ -13,10 +13,16 @@ list($post_stati, $avail_post_stati) = wp_edit_posts_query();
|
||||
$wp_query->max_num_pages = ceil( $wp_query->found_posts / 15 ); // We grab 20 but only show 15 ( 5 more for ajax extra )
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET['posted']; ?>
|
||||
<div id="message" class="updated fade"><p><strong><?php _e('Your post has been saved.'); ?></strong> <a href="<?php echo get_permalink( $_GET['posted'] ); ?>"><?php _e('View post'); ?></a> | <a href="post.php?action=edit&post=<?php echo $_GET['posted']; ?>"><?php _e('Edit post'); ?></a></p></div>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
|
||||
<div class="wrap">
|
||||
|
||||
<?php
|
||||
|
||||
$posts_columns = wp_manage_posts_columns();
|
||||
|
||||
?>
|
||||
|
@ -22,7 +22,7 @@ When you’re promoted, just reload this page and you’ll be able to bl
|
||||
exit();
|
||||
}
|
||||
|
||||
if ( isset($_GET['posted']) && $_GET['posted'] ) : ?>
|
||||
if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET['posted']; ?>
|
||||
<div id="message" class="updated fade"><p><strong><?php _e('Post saved.'); ?></strong> <a href="<?php echo get_permalink( $_GET['posted'] ); ?>"><?php _e('View post »'); ?></a></p></div>
|
||||
<?php
|
||||
endif;
|
||||
|
@ -12,14 +12,12 @@ 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();
|
||||
|
||||
// Redirect.
|
||||
if (!empty($_POST['mode'])) {
|
||||
if ( !empty( $_POST['mode'] ) ) {
|
||||
switch($_POST['mode']) {
|
||||
case 'bookmarklet':
|
||||
$location = $_POST['referredby'];
|
||||
@ -35,13 +33,13 @@ case 'post':
|
||||
$location = "post-new.php?posted=$post_ID";
|
||||
}
|
||||
|
||||
if ( isset($_POST['save']) )
|
||||
if ( isset( $_POST['save'] ) )
|
||||
$location = "post.php?action=edit&post=$post_ID";
|
||||
|
||||
if ( empty($post_ID) )
|
||||
if ( empty( $post_ID ) )
|
||||
$location = 'post-new.php';
|
||||
|
||||
wp_redirect($location);
|
||||
wp_redirect( $location );
|
||||
exit();
|
||||
break;
|
||||
|
||||
@ -139,7 +137,7 @@ case 'editpost':
|
||||
} elseif ($action == 'editattachment') {
|
||||
$location = 'attachments.php';
|
||||
} else {
|
||||
$location = 'post-new.php';
|
||||
$location = 'edit.php?posted=' . $post_ID;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user