Make WordPress Core


Ignore:
Timestamp:
05/03/2013 07:08:47 PM (11 years ago)
Author:
markjaquith
Message:

Add a 'quote_source_format' filter and make the default an em-dash and a space preceding the source.

fixes #24243

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post-formats.php

    r24146 r24170  
    728728 *
    729729 * @uses get_content_quote()
     730 * @uses apply_filters() Calls 'quote_source_format' filter to allow changing the typographical mark added to the quote source (em-dash prefix, by default)
    730731 *
    731732 * @param object $post (optional) A reference to the post object, falls back to get_post().
     
    750751    if ( ! empty( $meta['quote_source_name'] ) ) {
    751752        $source = ( empty( $meta['quote_source_url'] ) ) ? $meta['quote_source_name'] : sprintf( '<a href="%s">%s</a>', esc_url( $meta['quote_source_url'] ), $meta['quote_source_name'] );
     753        $source = sprintf( apply_filters( 'quote_source_format', __( '&#8212;&#160;%s' ) ), $source );
    752754        $quote .= sprintf( '<figcaption class="quote-caption">%s</figcaption>', $source );
    753755    }
Note: See TracChangeset for help on using the changeset viewer.