mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 00:01:27 +01:00
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:
parent
57b34ed1a4
commit
b04dfafeac
@ -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