Ticket #23852: 23852-quotes.diff
File 23852-quotes.diff, 2.8 KB (added by , 12 years ago) |
---|
-
wp-content/themes/twentythirteen/content-quote.php
10 10 11 11 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 12 12 <div class="entry-content"> 13 <?php twentythirteen_the_quote(); ?> 13 14 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentythirteen' ) ); ?> 14 15 <?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?> 15 16 </div><!-- .entry-content --> -
wp-content/themes/twentythirteen/style.css
1728 1728 color: #e63f2a; 1729 1729 } 1730 1730 1731 .format-quote .quote-caption, 1731 1732 .format-quote .entry-content small, 1732 1733 .format-quote .entry-content cite { 1733 1734 display: block; … … 1735 1736 margin-top: 20px; 1736 1737 } 1737 1738 1738 .format-quote footer.entry-meta { 1739 margin-top: 0; 1739 .format-quote .quote-caption small, 1740 .format-quote .quote-caption cite { 1741 display: inline; 1742 margin: auto; 1740 1743 } 1741 1744 1742 1745 .format-quote .entry-meta .author { -
wp-content/themes/twentythirteen/functions.php
472 472 return $atts; 473 473 } 474 474 475 if ( ! function_exists( 'twentythirteen_the_quote' ) ) : 476 /** 477 * Displays a quote based on post format meta data for quote post formats. 478 * 479 * @since Twenty Thirteen 1.0 480 * 481 * @return void 482 */ 483 function twentythirteen_the_quote() { 484 $quote_meta = get_post_format_meta( get_the_ID() ); 485 486 if ( empty( $quote_meta ) ) 487 return; 488 489 if ( ! empty( $quote_meta['quote'] ) && ! stristr( get_the_content(), $quote_meta['quote'] ) ) { 490 $quote = sprintf( '<blockquote>%s</blockquote>', wpautop( $quote_meta['quote'] ) ); 491 if ( ! empty( $quote_meta['quote_source'] ) ) { 492 $source = ( ! empty( $quote_meta['url'] ) ) ? 493 sprintf( '<a href="%s">%s</a>', esc_url( $quote_meta['url'] ), $quote_meta['quote_source'] ) : 494 $quote_meta['quote_source']; 495 $quote .= sprintf( '<figcaption class="quote-caption">%s</figcaption>', $source ); 496 } 497 $quote = sprintf( '<figure class="quote">%s</figure>', $quote ); 498 } 499 500 if ( isset( $quote ) ) 501 echo $quote; 502 } 503 endif; 504 475 505 /** 476 506 * Extends the default WordPress body class to denote: 477 507 * 1. Custom fonts enabled.