Few sidebar.php updates, functionality and look similar to the quick-post dashboard widget

git-svn-id: https://develop.svn.wordpress.org/trunk@8834 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2008-09-06 06:10:38 +00:00
parent 622026bb01
commit 55f93f1cb0
2 changed files with 83 additions and 54 deletions

View File

@@ -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(