Index: src/wp-includes/link-template.php
===================================================================
--- src/wp-includes/link-template.php	(revision 40747)
+++ src/wp-includes/link-template.php	(working copy)
@@ -247,15 +247,15 @@
  *
  * @global WP_Rewrite $wp_rewrite
  *
- * @param int $id         Optional. Post ID. Default uses the global `$post`.
- * @param bool $leavename Optional, defaults to false. Whether to keep post name. Default false.
- * @param bool $sample    Optional, defaults to false. Is it a sample permalink. Default false.
+ * @param int|WP_Post $post      Optional. Post ID or post object. Default is the global `$post`.
+ * @param bool        $leavename Optional, defaults to false. Whether to keep post name. Default false.
+ * @param bool        $sample    Optional, defaults to false. Is it a sample permalink. Default false.
  * @return string|WP_Error The post permalink.
  */
-function get_post_permalink( $id = 0, $leavename = false, $sample = false ) {
+function get_post_permalink( $post = 0, $leavename = false, $sample = false ) {
 	global $wp_rewrite;
 
-	$post = get_post($id);
+	$post = get_post( $post );
 
 	if ( is_wp_error( $post ) )
 		return $post;
@@ -264,12 +264,12 @@
 
 	$slug = $post->post_name;
 
-	$draft_or_pending = get_post_status( $id ) && in_array( get_post_status( $id ), array( 'draft', 'pending', 'auto-draft', 'future' ) );
+	$draft_or_pending = get_post_status( $post ) && in_array( get_post_status( $post ), array( 'draft', 'pending', 'auto-draft', 'future' ) );
 
 	$post_type = get_post_type_object($post->post_type);
 
 	if ( $post_type->hierarchical ) {
-		$slug = get_page_uri( $id );
+		$slug = get_page_uri( $post );
 	}
 
 	if ( !empty($post_link) && ( !$draft_or_pending || $sample ) ) {
@@ -1262,13 +1262,13 @@
  *
  * @since 2.3.0
  *
- * @param int    $id      Optional. Post ID. Default is the ID of the global `$post`.
- * @param string $context Optional. How to output the '&' character. Default '&amp;'.
+ * @param int|WP_Post $post    Optional. Post ID or post object. Default is the global `$post`.
+ * @param string      $context Optional. How to output the '&' character. Default '&amp;'.
  * @return string|null The edit post link for the given post. null if the post type is invalid or does
  *                     not allow an editing UI.
  */
-function get_edit_post_link( $id = 0, $context = 'display' ) {
-	if ( ! $post = get_post( $id ) )
+function get_edit_post_link( $post = 0, $context = 'display' ) {
+	if ( ! $post = get_post( $post ) )
 		return;
 
 	if ( 'revision' === $post->post_type )
@@ -1310,14 +1310,14 @@
  * @since 1.0.0
  * @since 4.4.0 The `$class` argument was added.
  *
- * @param string $text   Optional. Anchor text. If null, default is 'Edit This'. Default null.
- * @param string $before Optional. Display before edit link. Default empty.
- * @param string $after  Optional. Display after edit link. Default empty.
- * @param int    $id     Optional. Post ID. Default is the ID of the global `$post`.
- * @param string $class  Optional. Add custom class to link. Default 'post-edit-link'.
+ * @param string      $text   Optional. Anchor text. If null, default is 'Edit This'. Default null.
+ * @param string      $before Optional. Display before edit link. Default empty.
+ * @param string      $after  Optional. Display after edit link. Default empty.
+ * @param int|WP_Post $post   Optional. Post ID or post object. Default is the global `$post`.
+ * @param string      $class  Optional. Add custom class to link. Default 'post-edit-link'.
  */
-function edit_post_link( $text = null, $before = '', $after = '', $id = 0, $class = 'post-edit-link' ) {
-	if ( ! $post = get_post( $id ) ) {
+function edit_post_link( $text = null, $before = '', $after = '', $post = 0, $class = 'post-edit-link' ) {
+	if ( ! $post = get_post( $post ) ) {
 		return;
 	}
 
@@ -1350,16 +1350,16 @@
  *
  * @since 2.9.0
  *
- * @param int    $id           Optional. Post ID. Default is the ID of the global `$post`.
- * @param string $deprecated   Not used.
- * @param bool   $force_delete Optional. Whether to bypass trash and force deletion. Default false.
+ * @param int|WP_Post $post         Optional. Post ID or post object. Default is the global `$post`.
+ * @param string      $deprecated   Not used.
+ * @param bool        $force_delete Optional. Whether to bypass trash and force deletion. Default false.
  * @return string|void The delete post link URL for the given post.
  */
-function get_delete_post_link( $id = 0, $deprecated = '', $force_delete = false ) {
+function get_delete_post_link( $post = 0, $deprecated = '', $force_delete = false ) {
 	if ( ! empty( $deprecated ) )
 		_deprecated_argument( __FUNCTION__, '3.0.0' );
 
-	if ( !$post = get_post( $id ) )
+	if ( !$post = get_post( $post ) )
 		return;
 
 	$post_type_object = get_post_type_object( $post->post_type );
