Skip to content

Commit 5afd70d

Browse files
committed
Move wp_link_pages() with footer element
Automattic#1294
1 parent 9274f32 commit 5afd70d

File tree

2 files changed

+27
-29
lines changed

2 files changed

+27
-29
lines changed

template-parts/content-page.php

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,36 +17,32 @@
1717
<?php _s_post_thumbnail(); ?>
1818

1919
<div class="entry-content">
20-
<?php
21-
the_content();
20+
<?php the_content(); ?>
21+
</div><!-- .entry-content -->
2222

23+
<footer class="entry-footer">
24+
<?php
2325
wp_link_pages( array(
2426
'before' => '<div class="page-links">' . esc_html__( 'Pages:', '_s' ),
2527
'after' => '</div>',
2628
) );
27-
?>
28-
</div><!-- .entry-content -->
2929

30-
<?php if ( get_edit_post_link() ) : ?>
31-
<footer class="entry-footer">
32-
<?php
33-
edit_post_link(
34-
sprintf(
35-
wp_kses(
36-
/* translators: %s: Name of current post. Only visible to screen readers */
37-
__( 'Edit <span class="screen-reader-text">%s</span>', '_s' ),
38-
array(
39-
'span' => array(
40-
'class' => array(),
41-
),
42-
)
43-
),
44-
get_the_title()
30+
edit_post_link(
31+
sprintf(
32+
wp_kses(
33+
/* translators: %s: Name of current post. Only visible to screen readers */
34+
__( 'Edit <span class="screen-reader-text">%s</span>', '_s' ),
35+
array(
36+
'span' => array(
37+
'class' => array(),
38+
),
39+
)
4540
),
46-
'<span class="edit-link">',
47-
'</span>'
48-
);
49-
?>
50-
</footer><!-- .entry-footer -->
51-
<?php endif; ?>
41+
get_the_title()
42+
),
43+
'<span class="edit-link">',
44+
'</span>'
45+
);
46+
?>
47+
</footer><!-- .entry-footer -->
5248
</article><!-- #post-<?php the_ID(); ?> -->

template-parts/content.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,17 @@
4545
),
4646
get_the_title()
4747
) );
48+
?>
49+
</div><!-- .entry-content -->
4850

51+
<footer class="entry-footer">
52+
<?php
4953
wp_link_pages( array(
5054
'before' => '<div class="page-links">' . esc_html__( 'Pages:', '_s' ),
5155
'after' => '</div>',
5256
) );
53-
?>
54-
</div><!-- .entry-content -->
5557

56-
<footer class="entry-footer">
57-
<?php _s_entry_footer(); ?>
58+
_s_entry_footer();
59+
?>
5860
</footer><!-- .entry-footer -->
5961
</article><!-- #post-<?php the_ID(); ?> -->

0 commit comments

Comments
 (0)