Skip to content

Commit a293a77

Browse files
author
Pratik Nawkar
committed
Stop passing get_the_ID() to twentyseventeen_edit_link()
1 parent 56a6768 commit a293a77

4 files changed

Lines changed: 4 additions & 9 deletions

File tree

src/wp-content/themes/twentyseventeen/inc/template-tags.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,7 @@ function twentyseventeen_entry_footer() {
110110

111111
if ( ! function_exists( 'twentyseventeen_edit_link' ) ) :
112112
/**
113-
* Returns an accessibility-friendly link to edit a post or page.
114-
*
115-
* This also gives a little context about what exactly we're editing
116-
* (post or page?) so that users understand a bit more where they are in terms
117-
* of the template hierarchy and their content. Helpful when/if the single-page
118-
* layout with multiple posts/pages shown gets confusing.
113+
* Displays an accessibility-friendly edit link for the current post in the loop.
119114
*/
120115
function twentyseventeen_edit_link() {
121116
edit_post_link(

src/wp-content/themes/twentyseventeen/template-parts/page/content-front-page-panels.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<header class="entry-header">
3434
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
3535

36-
<?php twentyseventeen_edit_link( get_the_ID() ); ?>
36+
<?php twentyseventeen_edit_link(); ?>
3737

3838
</header><!-- .entry-header -->
3939

src/wp-content/themes/twentyseventeen/template-parts/page/content-front-page.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<header class="entry-header">
3131
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
3232

33-
<?php twentyseventeen_edit_link( get_the_ID() ); ?>
33+
<?php twentyseventeen_edit_link(); ?>
3434

3535
</header><!-- .entry-header -->
3636

src/wp-content/themes/twentyseventeen/template-parts/page/content-page.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
1616
<header class="entry-header">
1717
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
18-
<?php twentyseventeen_edit_link( get_the_ID() ); ?>
18+
<?php twentyseventeen_edit_link(); ?>
1919
</header><!-- .entry-header -->
2020
<div class="entry-content">
2121
<?php

0 commit comments

Comments
 (0)