the_permalink

The timeline below displays how wordpress function the_permalink has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 4.6

/**
 * WordPress Link Template Functions
 *
 * @package WordPress
 * @subpackage Template
 */
/**
 * Displays the permalink for the current post.
 *
 * @since 1.2.0
 * @since 4.4.0 Added the `$post` parameter.
 *
 * @param int|WP_Post $post Optional. Post ID or post object. Default is the global `$post`.
 */
function the_permalink($post = 0)
{
    /**
     * Filters the display of the permalink for the current post.
     *
     * @since 1.5.0
     * @since 4.4.0 Added the `$post` parameter.
     *
     * @param string      $permalink The permalink for the current post.
     * @param int|WP_Post $post      Post ID, WP_Post object, or 0. Default 0.
     */
    echo esc_url(apply_filters('the_permalink', get_permalink($post), $post));
}

WordPress Version: 4.4

/**
 * WordPress Link Template Functions
 *
 * @package WordPress
 * @subpackage Template
 */
/**
 * Display the permalink for the current post.
 *
 * @since 1.2.0
 * @since 4.4.0 Added the `$post` parameter.
 *
 * @param int|WP_Post $post Optional. Post ID or post object. Default is the global `$post`.
 */
function the_permalink($post = 0)
{
    /**
     * Filter the display of the permalink for the current post.
     *
     * @since 1.5.0
     * @since 4.4.0 Added the `$post` parameter.
     *
     * @param string      $permalink The permalink for the current post.
     * @param int|WP_Post $post      Post ID, WP_Post object, or 0. Default 0.
     */
    echo esc_url(apply_filters('the_permalink', get_permalink($post), $post));
}

WordPress Version: 3.9

/**
 * WordPress Link Template Functions
 *
 * @package WordPress
 * @subpackage Template
 */
/**
 * Display the permalink for the current post.
 *
 * @since 1.2.0
 */
function the_permalink()
{
    /**
     * Filter the display of the permalink for the current post.
     *
     * @since 1.5.0
     *
     * @param string $permalink The permalink for the current post.
     */
    echo esc_url(apply_filters('the_permalink', get_permalink()));
}

WordPress Version: 3.7

/**
 * WordPress Link Template Functions
 *
 * @package WordPress
 * @subpackage Template
 */
/**
 * Display the permalink for the current post.
 *
 * @since 1.2.0
 * @uses apply_filters() Calls 'the_permalink' filter on the permalink string.
 */
function the_permalink()
{
    echo esc_url(apply_filters('the_permalink', get_permalink()));
}