Use a post type object label for edit_post_link's title attribute. props sc0ttkclark.
git-svn-id: https://develop.svn.wordpress.org/trunk@14901 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b18836e3f9
commit
7efaa581d3
@ -827,7 +827,8 @@ function edit_post_link( $link = null, $before = '', $after = '', $id = 0 ) {
|
||||
if ( null === $link )
|
||||
$link = __('Edit This');
|
||||
|
||||
$link = '<a class="post-edit-link" href="' . $url . '" title="' . esc_attr( __( 'Edit Post' ) ) . '">' . $link . '</a>';
|
||||
$post_type_obj = get_post_type_object( $post->post_type );
|
||||
$link = '<a class="post-edit-link" href="' . $url . '" title="' . esc_attr( $post_type_obj->labels->edit_item ) . '">' . $link . '</a>';
|
||||
echo $before . apply_filters( 'edit_post_link', $link, $post->ID ) . $after;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user