In `edit_post_link()`, add an argument for the class attribute that defaults to `post-edit-link`.
Props voldemortensen. Fixes #30563. Built from https://develop.svn.wordpress.org/trunk@34098 git-svn-id: http://core.svn.wordpress.org/trunk@34066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
16b4096779
commit
c745c2deb3
|
@ -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 = '<a class="post-edit-link" href="' . $url . '">' . $text . '</a>';
|
||||
$link = '<a class="' . $class . '" href="' . $url . '">' . $text . '</a>';
|
||||
|
||||
/**
|
||||
* Filter the post edit link anchor tag.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-alpha-34097';
|
||||
$wp_version = '4.4-alpha-34098';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue