diff --git a/wp-admin/press-this.php b/wp-admin/press-this.php index 1d826a8d1..a7d5c81be 100644 --- a/wp-admin/press-this.php +++ b/wp-admin/press-this.php @@ -27,6 +27,7 @@ if ( ! current_user_can('edit_posts') ) */ function press_it() { // define some basic variables + $quick = array(); $quick['post_status'] = 'draft'; // set as draft first $quick['post_category'] = isset($_POST['post_category']) ? $_POST['post_category'] : null; $quick['tax_input'] = isset($_POST['tax_input']) ? $_POST['tax_input'] : null; @@ -64,6 +65,19 @@ function press_it() { } else { $quick['ID'] = $post_ID; wp_update_post($quick); + + // Post formats + if ( current_theme_supports( 'post-formats' ) && isset( $_POST['post_format'] ) ) { + $post_formats = get_theme_support( 'post-formats' ); + if ( is_array( $post_formats ) ) { + $post_formats = $post_formats[0]; + if ( in_array( $_POST['post_format'], $post_formats ) ) + set_post_format( $post_ID, $_POST['post_format'] ); + elseif ( '0' == $_POST['post_format'] ) + set_post_format( $post_ID, false ); + } + } + } return $post_ID; } @@ -468,10 +482,6 @@ var photostorage = false;
-
-
-
-

+ +

+ +

+