Make WordPress Core

Changeset 31726


Ignore:
Timestamp:
03/11/2015 07:59:03 PM (10 years ago)
Author:
helen
Message:

Enable more flexibility for non-URL GUIDs.

props stevenkword.
fixes #31080.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-filters.php

    r31708 r31726  
    168168add_filter( 'bloginfo_rss',       'ent2ncr',      8 );
    169169add_filter( 'the_author',         'ent2ncr',      8 );
     170add_filter( 'the_guid',           'esc_url'         );
    170171
    171172// Misc filters
  • trunk/src/wp-includes/post-template.php

    r31645 r31726  
    173173 */
    174174function the_guid( $id = 0 ) {
    175     echo esc_url( get_the_guid( $id ) );
     175    /**
     176     * Filter the escaped Global Unique Identifier (guid) of the post.
     177     *
     178     * @since 4.2.0
     179     *
     180     * @param string $post_guid Escaped Global Unique Identifier (guid) of the post.
     181     */
     182    echo apply_filters( 'the_guid', get_the_guid( $id ) );
    176183}
    177184
Note: See TracChangeset for help on using the changeset viewer.