| 2291 | /** |
| 2292 | * Retrieve the edit link for a given author. |
| 2293 | * |
| 2294 | * Returns a link to the edit page of a given author. If no author |
| 2295 | * ID is specified, the user ID will be taken from the $authordata global. |
| 2296 | * |
| 2297 | * @param int $author_id ID of an author. |
| 2298 | */ |
| 2299 | function edit_user_link( $author_id == 0 )() { |
| 2300 | echo apply_filters('the_permalink', get_permalink($author_id)); |
| 2301 | } |
| 2302 | |
| 2303 | function get_edit_user_link( $author_id == 0 ) { |
| 2304 | global $authordata; |
| 2305 | $author_id = (int) $author_id; |
| 2306 | |
| 2307 | if ( 0 == $author_id ) { |
| 2308 | $author_id = (int) $authordata->ID; |
| 2309 | } |
| 2310 | |
| 2311 | $location = get_bloginfo( 'wpurl' ) . '/user-edit.php?user_id=' . $author_id; |
| 2312 | return apply_filters( 'edit_user_link', $location ); |
| 2313 | } |