diff --git a/wp-admin/css/press-this.css b/wp-admin/css/press-this.css
index 2fb94c9331..da7aaeca61 100644
--- a/wp-admin/css/press-this.css
+++ b/wp-admin/css/press-this.css
@@ -16,6 +16,10 @@ img {
background: #444 !important;
}
+.tagchecklist span a {
+background: transparent url(../images/xit.gif) no-repeat 0 0;
+}
+
#poststuff #edButtonPreview,
#poststuff #edButtonHTML {
-moz-border-radius: 3px 3px 0 0;
diff --git a/wp-admin/press-this.php b/wp-admin/press-this.php
index a9524ac79c..b7dc416322 100644
--- a/wp-admin/press-this.php
+++ b/wp-admin/press-this.php
@@ -10,7 +10,7 @@
require_once('admin.php');
header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
-if ( ! current_user_can('publish_posts') ) wp_die( __( 'Cheatin’ uh?' ) );
+if ( ! current_user_can('edit_posts') ) wp_die( __( 'Cheatin’ uh?' ) );
/**
* Replace forward slash with backslash and slash.
@@ -64,16 +64,14 @@ function press_it() {
$post_ID = wp_insert_post($quick, true);
$content = $_REQUEST['content'];
- if($_REQUEST['photo_src'])
+ if( $_REQUEST['photo_src'] && current_user_can('upload_files') )
foreach( (array) $_REQUEST['photo_src'] as $key => $image)
// see if files exist in content - we don't want to upload non-used selected files.
if( strpos($_REQUEST['content'], $image) !== false ) {
$upload = media_sideload_image($image, $post_ID, $_REQUEST['photo_description'][$key]);
-
- // Replace the POSTED content with correct uploaded ones.
- // escape quote for matching
- $quoted = preg_quote2($image);
- if( !is_wp_error($upload) ) $content = preg_replace('/
]*)src=(\"|\')'.$quoted.'(\2)([^>\/]*)\/*>/is', $upload, $content);
+
+ // Replace the POSTED content
with correct uploaded ones. Regex contains fix for Magic Quotes
+ if( !is_wp_error($upload) ) $content = preg_replace('/
]*)src=\\\?(\"|\')'.preg_quote2($image).'\\\?(\2)([^>\/]*)\/*>/is', $upload, $content);
}
// set the post_content and status
@@ -461,7 +459,22 @@ var ajaxurl = '';
+
+
+
+
+
+
+
+
- - -
- -