Make WordPress Core

Changeset 35002


Ignore:
Timestamp:
10/10/2015 05:45:27 AM (11 years ago)
Author:
DrewAPicture
Message:

Template: Pass the $post parameter to the the_permalink filter.

Props chriscct7.
Fixes #34234. See #23882.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/link-template.php

    r35001 r35002  
    2020         *
    2121         * @since 1.5.0
    22          *
    23          * @param string $permalink The permalink for the current post.
    24          */
    25         echo esc_url( apply_filters( 'the_permalink', get_permalink( $post ) ) );
     22         * @since 4.4.0 Added the `$post` parameter.
     23         *
     24         * @param string      $permalink The permalink for the current post.
     25         * @param int|WP_Post $post      Post ID, WP_Post object, or 0. Default 0.
     26         */
     27        echo esc_url( apply_filters( 'the_permalink', get_permalink( $post ), $post ) );
    2628}
    2729
Note: See TracChangeset for help on using the changeset viewer.