Merge pull request #775 from davidakennedy/editlinkposttitle

Add post title to `edit_post_link`
This commit is contained in:
sarah ✈ semark 2015-09-16 19:58:22 +01:00
commit b1b13f58d8
2 changed files with 20 additions and 2 deletions

View File

@ -65,7 +65,15 @@ function _s_entry_footer() {
echo '</span>';
}
edit_post_link( esc_html__( 'Edit', '_s' ), '<span class="edit-link">', '</span>' );
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
esc_html__( 'Edit %s', '_s' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
),
'<span class="edit-link">',
'</span>'
);
}
endif;

View File

@ -25,7 +25,17 @@
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php edit_post_link( esc_html__( 'Edit', '_s' ), '<span class="edit-link">', '</span>' ); ?>
<?php
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
esc_html__( 'Edit %s', '_s' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
),
'<span class="edit-link">',
'</span>'
);
?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->