Ticket #9898: 9898.diff
File 9898.diff, 869 bytes (added by , 15 years ago) |
---|
-
wp-includes/link-template.php
711 711 } 712 712 713 713 /** 714 * Retrieve edit postslink for post.714 * Display edit post link for post. 715 715 * 716 716 * @since 1.0.0 717 717 * 718 718 * @param string $link Optional. Anchor text. 719 719 * @param string $before Optional. Display before edit link. 720 720 * @param string $after Optional. Display after edit link. 721 * @param int $id Optional. Post ID. 721 722 */ 722 function edit_post_link( $link = 'Edit This', $before = '', $after = '' ) { 723 global $post; 723 function edit_post_link( $link = 'Edit This', $before = '', $after = '', $id = 0 ) { 724 if ( !$post = &get_post( $id ) ) 725 return; 724 726 725 727 if ( $post->post_type == 'page' ) { 726 728 if ( !current_user_can( 'edit_page', $post->ID ) )