File tree Expand file tree Collapse file tree
src/wp-content/themes/twentyseventeen/inc Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -110,22 +110,20 @@ function twentyseventeen_entry_footer() {
110110
111111if ( ! function_exists ( 'twentyseventeen_edit_link ' ) ) :
112112 /**
113- * Returns an accessibility-friendly link to edit a post or page.
113+ * Displays an accessibility-friendly link to edit a post or page.
114114 *
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.
115+ * @param int $post_id Post ID. Default 0.
119116 */
120- function twentyseventeen_edit_link () {
117+ function twentyseventeen_edit_link ( $ post_id = 0 ) {
121118 edit_post_link (
122119 sprintf (
123120 /* translators: %s: Post title. Only visible to screen readers. */
124121 __ ( 'Edit<span class="screen-reader-text"> "%s"</span> ' , 'twentyseventeen ' ),
125- get_the_title ()
122+ get_the_title ( $ post_id )
126123 ),
127124 '<span class="edit-link"> ' ,
128- '</span> '
125+ '</span> ' ,
126+ $ post_id
129127 );
130128 }
131129endif ;
You can’t perform that action at this time.
0 commit comments