Use a post type object label for edit_post_link's title attribute. props sc0ttkclark.

git-svn-id: http://svn.automattic.com/wordpress/trunk@14901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-05-25 18:55:51 +00:00
parent 57b34ed1a4
commit b04dfafeac
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;
}