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:
Andrew Nacin 2010-05-25 18:55:51 +00:00
parent b18836e3f9
commit 7efaa581d3
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}