Skip to content

Commit

Permalink
Merge pull request #949 from phoenixenero/master
Browse files Browse the repository at this point in the history
Only show page entry footer if edit link is available; props @phoenixenero
  • Loading branch information
sixhours authored Jun 13, 2016
2 parents a207291 + ce8d6cc commit e1144ed
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions template-parts/content-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -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-## -->

0 comments on commit e1144ed

Please sign in to comment.