Press This: on sites that support oEmbed, if the user has selected some text, quote it below the embed.
Props stephdau. Fixes #31763. Built from https://develop.svn.wordpress.org/trunk@31894 git-svn-id: http://core.svn.wordpress.org/trunk@31873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
de7ecc80d3
commit
6cc20e7095
|
@ -1009,6 +1009,11 @@ class WP_Press_This {
|
|||
|
||||
if ( ! empty( $data['u'] ) && $oembed->get_provider( $data['u'], array( 'discover' => false ) ) ) {
|
||||
$default_html['embed'] = '<p>[embed]' . $data['u'] . '[/embed]</p>';
|
||||
|
||||
if ( ! empty( $data['s'] ) ) {
|
||||
// If the user has selected some text, do quote it.
|
||||
$default_html['quote'] = '<blockquote>%1$s</blockquote>';
|
||||
}
|
||||
} else {
|
||||
$default_html['quote'] = '<blockquote>%1$s</blockquote>';
|
||||
$default_html['link'] = '<p>' . _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 );
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue