Make WordPress Core


Ignore:
Timestamp:
07/12/2013 07:34:59 PM (12 years ago)
Author:
nacin
Message:

Simplify and reduce the new media/content extraction functions.

The URL extraction function is now get_url_in_content(). For more, see #24202.

Also adds filters to get_post_galleries() and get_post_gallery(). fixes #24309.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentythirteen/functions.php

    r24541 r24682  
    485485 * Returns the URL from the post.
    486486 *
    487  * @uses get_content_url() to get the URL in the post meta (if it exists) or
     487 * @uses get_url_in_content() to get the URL in the post meta (if it exists) or
    488488 * the first link found in the post content.
    489489 *
     
    496496function twentythirteen_get_link_url() {
    497497    $content = get_the_content();
    498     $has_url = get_content_url( $content );
     498    $has_url = get_url_in_content( $content );
    499499
    500500    return ( $has_url ) ? $has_url : apply_filters( 'the_permalink', get_permalink() );
Note: See TracChangeset for help on using the changeset viewer.