From 9a9c56866bee74b357ef6279faa1065ba578446c Mon Sep 17 00:00:00 2001 From: azaozz Date: Sat, 6 Sep 2008 06:10:38 +0000 Subject: [PATCH] Few sidebar.php updates, functionality and look similar to the quick-post dashboard widget git-svn-id: http://svn.automattic.com/wordpress/trunk@8834 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/post.php | 5 +- wp-admin/sidebar.php | 132 ++++++++++++++++++++++++++----------------- 2 files changed, 83 insertions(+), 54 deletions(-) diff --git a/wp-admin/post.php b/wp-admin/post.php index ceef82aca4..70e43ca5b3 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -34,7 +34,10 @@ function redirect_post($post_ID = '') { if ( !empty($_POST['mode']) && 'bookmarklet' == $_POST['mode'] ) { $location = $_POST['referredby']; } elseif ( !empty($_POST['mode']) && 'sidebar' == $_POST['mode'] ) { - $location = 'sidebar.php?a=b'; + if ( isset($_POST['saveasdraft']) ) + $location = 'sidebar.php?a=c'; + elseif ( isset($_POST['publish']) ) + $location = 'sidebar.php?a=b'; } elseif ( ( isset($_POST['save']) || isset($_POST['publish']) ) && ( empty($referredby) || $referredby == $referer || 'redo' != $referredby ) ) { if ( $_POST['_wp_original_http_referer'] && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/post.php') === false && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/post-new.php') === false ) $location = add_query_arg( array( diff --git a/wp-admin/sidebar.php b/wp-admin/sidebar.php index d4b7b3999b..210c0b9bfd 100644 --- a/wp-admin/sidebar.php +++ b/wp-admin/sidebar.php @@ -18,78 +18,107 @@ require_once('admin.php'); if ( ! current_user_can('edit_posts') ) wp_die(__('Cheatin’ uh?')); -if ('b' == $_GET['a']) { - -?> - - - -<?php _e('WordPress › Posted'); ?> - - - -

-

Click here to post again.'), 'sidebar.php'); ?>

- - -<?php _e('WordPress › Sidebar'); ?> - +<?php bloginfo('name') ?> › <?php _e('Sidebar'); ?> -

WordPress

+
- -

- -

-

- - - -

+ + +

' . __('Post published.') . '

'; +elseif ( 'c' == $_GET['a'] ) + echo '

' . __('Post saved.') . '

'; +?>

- - + +

+

- + + +

+ +
+ + +

+
+ +

+ - +

@@ -97,6 +126,3 @@ form { - \ No newline at end of file