Changeset 62000
- Timestamp:
- 03/13/2026 01:36:00 AM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyseventeen/inc/template-tags.php
r61302 r62000 111 111 if ( ! function_exists( 'twentyseventeen_edit_link' ) ) : 112 112 /** 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 editing116 * (post or page?) so that users understand a bit more where they are in terms117 * of the template hierarchy and their content. Helpful when/if the single-page118 * layout with multiple posts/pages shown gets confusing.119 */ 120 function twentyseventeen_edit_link( ) {113 * Displays an accessibility-friendly link to edit a post or page. 114 * 115 * @since Twenty Seventeen 1.0 116 * @since Twenty Seventeen 4.1 Added `$post_id` parameter. 117 * 118 * @param int $post_id Post ID. Default 0. 119 */ 120 function twentyseventeen_edit_link( $post_id = 0 ) { 121 121 edit_post_link( 122 122 sprintf( 123 123 /* translators: %s: Post title. Only visible to screen readers. */ 124 124 __( 'Edit<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ), 125 get_the_title( )125 get_the_title( $post_id ) 126 126 ), 127 127 '<span class="edit-link">', 128 '</span>' 128 '</span>', 129 $post_id 129 130 ); 130 131 }
Note: See TracChangeset
for help on using the changeset viewer.