Better default quote markup for post format fallbacks.
props obenland. see #23347 git-svn-id: http://core.svn.wordpress.org/trunk@23822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2a45fd4453
commit
d1d2a3a3ff
|
@ -340,15 +340,12 @@ function post_formats_compat( $content, $id = 0 ) {
|
||||||
|
|
||||||
case 'quote':
|
case 'quote':
|
||||||
if ( ! empty( $meta['quote'] ) && ! stristr( $content, $meta['quote'] ) ) {
|
if ( ! empty( $meta['quote'] ) && ! stristr( $content, $meta['quote'] ) ) {
|
||||||
$format_output .= sprintf( '<blockquote>%s</blockquote>', $meta['quote'] );
|
$quote = sprintf( '<blockquote>%s</blockquote>', wpautop( $meta['quote'] ) );
|
||||||
if ( ! empty( $meta['quote_source'] ) ) {
|
if ( ! empty( $meta['quote_source'] ) ) {
|
||||||
$format_output .= sprintf(
|
$source = ( empty( $quote_meta['url'] ) ) ? $meta['quote_source'] : sprintf( '<a href="%s">%s</a>', esc_url( $meta['url'] ), $meta['quote_source'] );
|
||||||
'<cite>%s</cite>',
|
$quote .= sprintf( '<figcaption class="quote-caption">%s</figcaption>', $source );
|
||||||
! empty( $meta['url'] ) ?
|
|
||||||
sprintf( '<a href="%s">%s</a>', esc_url( $meta['url'] ), $meta['quote_source'] ) :
|
|
||||||
$meta['quote_source']
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
$format_output .= sprintf( '<figure class="quote">%s</figure>', $quote );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue