Merge pull request #949 from phoenixenero/master

Only show page entry footer if edit link is available; props @phoenixenero
This commit is contained in:
Caroline Moore 2016-06-13 16:46:30 -04:00 committed by GitHub
commit e1144edb00
1 changed files with 15 additions and 13 deletions

View File

@ -25,17 +25,19 @@
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?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 -->
<?php if ( get_edit_post_link() ) : ?>
<footer class="entry-footer">
<?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 -->
<?php endif; ?>
</article><!-- #post-## -->