Changeset 34982
- Timestamp:
- 10/09/2015 04:33:16 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/link-template.php
r34717 r34982 11 11 * 12 12 * @since 1.2.0 13 */ 14 function the_permalink() { 13 * @since 4.4.0 Added `$id` parameter. 14 * 15 * @param int|WP_Post $id Optional. Post ID or post object. Default current post. 16 */ 17 function the_permalink( $id = 0 ) { 15 18 /** 16 19 * Filter the display of the permalink for the current post. … … 20 23 * @param string $permalink The permalink for the current post. 21 24 */ 22 echo esc_url( apply_filters( 'the_permalink', get_permalink( ) ) );25 echo esc_url( apply_filters( 'the_permalink', get_permalink( $id ) ) ); 23 26 } 24 27 … … 92 95 * @see get_permalink() 93 96 * 94 * @param int|WP_Post $id Optional. Post ID or post object. Default is thecurrent post.97 * @param int|WP_Post $id Optional. Post ID or post object. Default current post. 95 98 * @param bool $leavename Optional. Whether to keep post name or page name. Default false. 96 99 * @return string|false The permalink URL or false if post does not exist.
Note: See TracChangeset
for help on using the changeset viewer.