Make WordPress Core

Changeset 27409


Ignore:
Timestamp:
03/05/2014 07:23:22 AM (11 years ago)
Author:
nacin
Message:

Introduce get_the_permalink() as an alias for get_permalink().

This better aligns it with other the_* and get_the_* function pairs.

props ericmann.
fixes #24164.

File:
1 edited

Legend:

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

    r27296 r27409  
    7070
    7171/**
     72 * Retrieve full permalink for current post or post ID. Alias for get_permalink().
     73 *
     74 * @since 3.9.0
     75 * @see get_permalink()
     76 *
     77 * @param int|WP_Post $id        Optional. Post ID or post object. Defaults current post.
     78 * @param bool        $leavename Optional. Whether to keep post name or page name. Default false.
     79 * @return string|bool The permalink URL or false if post does not exist.
     80 */
     81function get_the_permalink( $id = 0, $leavename = false ) {
     82    return get_permalink( $id, $leavename );
     83}
     84
     85/**
    7286 * Retrieve full permalink for current post or post ID.
    7387 *
    7488 * @since 1.0.0
    7589 *
    76  * @param int|WP_Post $id Optional. Post ID or post object, defaults to the current post.
    77  * @param bool $leavename Optional. Whether to keep post name or page name, defaults to false.
     90 * @param int|WP_Post $id        Optional. Post ID or post object. Default current post.
     91 * @param bool        $leavename Optional. Whether to keep post name or page name. Default false.
    7892 * @return string|bool The permalink URL or false if post does not exist.
    7993 */
Note: See TracChangeset for help on using the changeset viewer.