Definition:
function get_edit_post_link( $id = 0, $context = 'display' ) {}
Parameters
- int $id: Optional. Post ID.
- string $context: Optional, defaults to display. How to write the ‘&’, defaults to ‘&’.
Defined filters
- get_edit_post_link
apply_filters( 'get_edit_post_link', admin_url( sprintf($post_type_object->_edit_link . $action, $post->ID)
Source code
function get_edit_post_link( $id = 0, $context = 'display' ) {
if ( !$post = &get_post( $id ) )
return;
if ( 'display' == $context )
$action = '&action=edit';
else
$action = '&action=edit';
$post_type_object = get_post_type_object( $post->post_type );
if ( !$post_type_object )
return;
if ( !current_user_can( $post_type_object->cap->edit_post, $post->ID ) )
return;
return apply_filters( 'get_edit_post_link', admin_url( sprintf($post_type_object->_edit_link . $action, $post->ID) ), $post->ID, $context );
}
1380

February 12, 2011 


get_edit_comment_link
Definition:
function get_edit_comment_link( $comment_id = 0 ) {}
Parameters
Defined filters
apply_filters( 'get_edit_comment_link', $location )Source code
function get_edit_comment_link( $comment_id = 0 ) { $comment = &get_comment( $comment_id ); if ( !current_user_can( 'edit_comment', $comment->comment_ID ) ) return; $location = admin_url('comment.php?action=editcomment&c=') . $comment->comment_ID; return apply_filters( 'get_edit_comment_link', $location ); }1378