Make WordPress Core

Ticket #23882: 23882.2.patch

File 23882.2.patch, 773 bytes (added by chriscct7, 9 years ago)
  • src/wp-includes/link-template.php

     
    1010 * Display the permalink for the current post.
    1111 *
    1212 * @since 1.2.0
     13 * @since 4.4.0 $id param
     14 *
     15 * @param int $id Optional. Post ID.
    1316 */
    14 function the_permalink() {
     17function the_permalink( $id = 0 ) {
    1518        /**
    1619         * Filter the display of the permalink for the current post.
    1720         *
     
    1922         *
    2023         * @param string $permalink The permalink for the current post.
    2124         */
    22         echo esc_url( apply_filters( 'the_permalink', get_permalink() ) );
     25        echo esc_url( apply_filters( 'the_permalink', get_permalink( $id ) ) );
    2326}
    2427
    2528/**