Remove remains from the old bookmarklet code

git-svn-id: http://svn.automattic.com/wordpress/trunk@12029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2009-10-14 05:53:49 +00:00
parent 0a665944e8
commit c790ebcdd9
6 changed files with 7 additions and 30 deletions

View File

@ -48,7 +48,7 @@ $posts_per_page = get_option('posts_per_page');
$date_format = get_option('date_format');
$time_format = get_option('time_format');
wp_reset_vars(array('profile', 'redirect', 'redirect_url', 'a', 'popuptitle', 'popupurl', 'text', 'trackback', 'pingback'));
wp_reset_vars(array('profile', 'redirect', 'redirect_url', 'a', 'text', 'trackback', 'pingback'));
wp_admin_css_color('classic', __('Blue'), admin_url("css/colors-classic.css"), array('#073447', '#21759B', '#EAF3FA', '#BBD8E7'));
wp_admin_css_color('fresh', __('Gray'), admin_url("css/colors-fresh.css"), array('#464646', '#6D6D6D', '#F1F1F1', '#DFDFDF'));

View File

@ -128,10 +128,6 @@ require_once('admin-header.php');
?>
<?php if ( (isset($mode) && 'bookmarklet' == $mode) || isset($_GET['popupurl']) ): ?>
<input type="hidden" name="mode" value="bookmarklet" />
<?php endif; ?>
<div class="wrap">
<?php screen_icon(); ?>
<h2><?php echo esc_html( $title ); ?></h2>

View File

@ -109,12 +109,8 @@ require_once('admin-header.php');
<div id="message" class="updated fade"><p><?php echo $message; ?></p></div>
<?php endif; ?>
<?php
wp_nonce_field($nonce_action);
<?php wp_nonce_field($nonce_action); ?>
if (isset($mode) && 'bookmarklet' == $mode)
echo '<input type="hidden" name="mode" value="bookmarklet" />';
?>
<input type="hidden" id="user-id" name="user_ID" value="<?php echo $user_ID ?>" />
<input type="hidden" id="hiddenaction" name="action" value='<?php echo esc_attr($form_action) ?>' />
<input type="hidden" id="originalaction" name="originalaction" value="<?php echo esc_attr($form_action) ?>" />

View File

@ -326,29 +326,18 @@ function bulk_edit_posts( $post_data = null ) {
* @return unknown
*/
function get_default_post_to_edit() {
$post_title = '';
if ( !empty( $_REQUEST['post_title'] ) )
$post_title = esc_html( stripslashes( $_REQUEST['post_title'] ));
else if ( !empty( $_REQUEST['popuptitle'] ) ) {
$post_title = esc_html( stripslashes( $_REQUEST['popuptitle'] ));
$post_title = funky_javascript_fix( $post_title );
} else {
$post_title = '';
}
$post_content = '';
if ( !empty( $_REQUEST['content'] ) )
$post_content = esc_html( stripslashes( $_REQUEST['content'] ));
else if ( !empty( $post_title ) ) {
$text = esc_html( stripslashes( urldecode( $_REQUEST['text'] ) ) );
$text = funky_javascript_fix( $text);
$popupurl = esc_url($_REQUEST['popupurl']);
$post_content = '<a href="'.$popupurl.'">'.$post_title.'</a>'."\n$text";
}
$post_excerpt = '';
if ( !empty( $_REQUEST['excerpt'] ) )
$post_excerpt = esc_html( stripslashes( $_REQUEST['excerpt'] ));
else
$post_excerpt = '';
$post->ID = 0;
$post->post_name = '';

View File

@ -31,9 +31,7 @@ function redirect_page($page_ID) {
}
$referer = preg_replace('|https?://[^/]+|i', '', wp_get_referer());
if ( 'post' == $_POST['originalaction'] && !empty($_POST['mode']) && 'bookmarklet' == $_POST['mode'] ) {
$location = $_POST['referredby'];
} elseif ( 'post' == $_POST['originalaction'] && !empty($_POST['mode']) && 'sidebar' == $_POST['mode'] ) {
if ( 'post' == $_POST['originalaction'] && !empty($_POST['mode']) && 'sidebar' == $_POST['mode'] ) {
$location = 'sidebar.php?a=b';
} elseif ( isset($_POST['save']) || isset($_POST['publish']) ) {
$status = get_post_status( $page_ID );

View File

@ -31,9 +31,7 @@ function redirect_post($post_ID = '') {
}
$referer = preg_replace('|https?://[^/]+|i', '', wp_get_referer());
if ( !empty($_POST['mode']) && 'bookmarklet' == $_POST['mode'] ) {
$location = $_POST['referredby'];
} elseif ( !empty($_POST['mode']) && 'sidebar' == $_POST['mode'] ) {
if ( !empty($_POST['mode']) && 'sidebar' == $_POST['mode'] ) {
if ( isset($_POST['saveasdraft']) )
$location = 'sidebar.php?a=c';
elseif ( isset($_POST['publish']) )