diff --git a/wp-admin/includes/class-wp-press-this.php b/wp-admin/includes/class-wp-press-this.php index 92d6f95fe3..eb2eb6d856 100644 --- a/wp-admin/includes/class-wp-press-this.php +++ b/wp-admin/includes/class-wp-press-this.php @@ -1009,6 +1009,11 @@ class WP_Press_This { if ( ! empty( $data['u'] ) && $oembed->get_provider( $data['u'], array( 'discover' => false ) ) ) { $default_html['embed'] = '

[embed]' . $data['u'] . '[/embed]

'; + + if ( ! empty( $data['s'] ) ) { + // If the user has selected some text, do quote it. + $default_html['quote'] = '
%1$s
'; + } } else { $default_html['quote'] = '
%1$s
'; $default_html['link'] = '

' . _x( 'Source:', 'Used in Press This to indicate where the content comes from.' ) . @@ -1030,7 +1035,7 @@ class WP_Press_This { } // Wrap suggested content in the specified HTML. - if ( ! empty( $default_html['quote'] ) ) { + if ( ! empty( $default_html['quote'] ) && $text ) { $content .= sprintf( $default_html['quote'], $text ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 0afc7d8f85..461ddbbaa8 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-beta2-31893'; +$wp_version = '4.2-beta2-31894'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.