forked from mirror/_s
Merge pull request #775 from davidakennedy/editlinkposttitle
Add post title to `edit_post_link`
This commit is contained in:
commit
b1b13f58d8
|
@ -65,7 +65,15 @@ function _s_entry_footer() {
|
||||||
echo '</span>';
|
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;
|
endif;
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,17 @@
|
||||||
</div><!-- .entry-content -->
|
</div><!-- .entry-content -->
|
||||||
|
|
||||||
<footer class="entry-footer">
|
<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 -->
|
</footer><!-- .entry-footer -->
|
||||||
</article><!-- #post-## -->
|
</article><!-- #post-## -->
|
||||||
|
|
||||||
|
|
Reference in New Issue