WordPress.org

Make WordPress Core

Ticket #23882: 23882.patch

File 23882.patch, 611 bytes (added by johnjamesjacoby, 5 years ago)

Add $id and $leavename params to the_permalink(), to match get_the_permalink()

  • wp-includes/link-template.php

     
    1111 *
    1212 * @since 1.2.0
    1313 * @uses apply_filters() Calls 'the_permalink' filter on the permalink string.
     14 *
     15 * @param int $id Optional. Post ID.
     16 * @param bool $leavename Optional, defaults to false. Whether to keep post name or page name.
    1417 */
    15 function the_permalink() {
    16         echo esc_url( apply_filters( 'the_permalink', get_permalink() ) );
     18function the_permalink( $id = 0, $leavename = false ) {
     19        echo esc_url( apply_filters( 'the_permalink', get_permalink( $id, $leavename ) ) );
    1720}