WordPress.org

Make WordPress Core

Ticket #23570: 23570.5.diff

File 23570.5.diff, 1.1 KB (added by helen, 9 years ago)
  • wp-includes/post-formats.php

     
    398398 * @since 3.6.0
    399399 *
    400400 * @param string $content A string which might contain a URL.
    401  * @param boolean $remove Whether the remove the found URL from the passed content.
     401 * @param boolean $remove Whether to remove the found URL from the passed content.
    402402 * @return string The found URL.
    403403 */
    404404function get_content_url( &$content, $remove = false ) {
     
    446446        if ( empty( $post ) )
    447447                return '';
    448448
    449         if ( has_post_format( 'link', $post ) ) {
     449        if ( in_array( get_post_format( $post->ID, array( 'link', 'quote' ) ) ) ) {
    450450                $meta = get_post_format_meta( $post->ID );
    451451                if ( ! empty( $meta['url'] ) )
    452                         return esc_url_raw( $meta['url'] );
     452                        return apply_filters( 'get_the_url', esc_url_raw( $meta['url'] ), $post );
    453453        }
    454454
    455455        if ( ! empty( $post->post_content ) )
    456                 return get_content_url( $post->post_content );
     456                return apply_filters( 'get_the_url', get_content_url( $post->post_content ), $post );
    457457}
    458458
    459459/**