From a293a7721a72d7d51984813d7a68a0b2e83a5c08 Mon Sep 17 00:00:00 2001 From: Pratik Nawkar Date: Mon, 9 Mar 2026 10:39:04 +0530 Subject: [PATCH 1/2] Stop passing get_the_ID() to twentyseventeen_edit_link() --- .../themes/twentyseventeen/inc/template-tags.php | 7 +------ .../template-parts/page/content-front-page-panels.php | 2 +- .../template-parts/page/content-front-page.php | 2 +- .../twentyseventeen/template-parts/page/content-page.php | 2 +- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/wp-content/themes/twentyseventeen/inc/template-tags.php b/src/wp-content/themes/twentyseventeen/inc/template-tags.php index 6cdb6c6be5a53..57e8ef861c684 100644 --- a/src/wp-content/themes/twentyseventeen/inc/template-tags.php +++ b/src/wp-content/themes/twentyseventeen/inc/template-tags.php @@ -110,12 +110,7 @@ function twentyseventeen_entry_footer() { if ( ! function_exists( 'twentyseventeen_edit_link' ) ) : /** - * Returns an accessibility-friendly link to edit a post or page. - * - * This also gives a little context about what exactly we're editing - * (post or page?) so that users understand a bit more where they are in terms - * of the template hierarchy and their content. Helpful when/if the single-page - * layout with multiple posts/pages shown gets confusing. + * Displays an accessibility-friendly edit link for the current post in the loop. */ function twentyseventeen_edit_link() { edit_post_link( diff --git a/src/wp-content/themes/twentyseventeen/template-parts/page/content-front-page-panels.php b/src/wp-content/themes/twentyseventeen/template-parts/page/content-front-page-panels.php index 923c11f6132a1..f6f009a63a1c6 100644 --- a/src/wp-content/themes/twentyseventeen/template-parts/page/content-front-page-panels.php +++ b/src/wp-content/themes/twentyseventeen/template-parts/page/content-front-page-panels.php @@ -33,7 +33,7 @@
', '' ); ?> - +
diff --git a/src/wp-content/themes/twentyseventeen/template-parts/page/content-front-page.php b/src/wp-content/themes/twentyseventeen/template-parts/page/content-front-page.php index b80749861e291..0cea464c4c6b9 100644 --- a/src/wp-content/themes/twentyseventeen/template-parts/page/content-front-page.php +++ b/src/wp-content/themes/twentyseventeen/template-parts/page/content-front-page.php @@ -30,7 +30,7 @@
', '' ); ?> - +
diff --git a/src/wp-content/themes/twentyseventeen/template-parts/page/content-page.php b/src/wp-content/themes/twentyseventeen/template-parts/page/content-page.php index 6e99666e8dbee..f34d5fc829892 100644 --- a/src/wp-content/themes/twentyseventeen/template-parts/page/content-page.php +++ b/src/wp-content/themes/twentyseventeen/template-parts/page/content-page.php @@ -15,7 +15,7 @@
>
', '' ); ?> - +
Date: Tue, 10 Mar 2026 05:18:39 +0530 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Stephen A. Bernhardt --- src/wp-content/themes/twentyseventeen/inc/template-tags.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-content/themes/twentyseventeen/inc/template-tags.php b/src/wp-content/themes/twentyseventeen/inc/template-tags.php index 57e8ef861c684..0ca82faa3114f 100644 --- a/src/wp-content/themes/twentyseventeen/inc/template-tags.php +++ b/src/wp-content/themes/twentyseventeen/inc/template-tags.php @@ -110,7 +110,7 @@ function twentyseventeen_entry_footer() { if ( ! function_exists( 'twentyseventeen_edit_link' ) ) : /** - * Displays an accessibility-friendly edit link for the current post in the loop. + * Displays an accessibility-friendly link to edit a post or page. */ function twentyseventeen_edit_link() { edit_post_link(