From f20622f394f168d6b2c3cef9a23f3255a4c0d792 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sun, 13 Sep 2015 23:33:30 +0000 Subject: [PATCH] In `edit_post_link()`, add an argument for the class attribute that defaults to `post-edit-link`. Props voldemortensen. Fixes #30563. git-svn-id: https://develop.svn.wordpress.org/trunk@34098 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/link-template.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/link-template.php b/src/wp-includes/link-template.php index dd04b24731..9ad18aa6f3 100644 --- a/src/wp-includes/link-template.php +++ b/src/wp-includes/link-template.php @@ -1210,8 +1210,9 @@ function get_edit_post_link( $id = 0, $context = 'display' ) { * @param string $before Optional. Display before edit link. * @param string $after Optional. Display after edit link. * @param int $id Optional. Post ID. + * @param string $class Optional. Add custom class to link. */ -function edit_post_link( $text = null, $before = '', $after = '', $id = 0 ) { +function edit_post_link( $text = null, $before = '', $after = '', $id = 0, $class = 'post-edit-link' ) { if ( ! $post = get_post( $id ) ) { return; } @@ -1224,7 +1225,7 @@ function edit_post_link( $text = null, $before = '', $after = '', $id = 0 ) { $text = __( 'Edit This' ); } - $link = '' . $text . ''; + $link = '' . $text . ''; /** * Filter the post edit link anchor tag.