WordPress.org

Make WordPress Core

Ticket #30563: 30563.2.diff

File 30563.2.diff, 974 bytes (added by wonderboymusic, 6 years ago)
  • src/wp-includes/link-template.php

     
    12101210 * @param string $before Optional. Display before edit link.
    12111211 * @param string $after  Optional. Display after edit link.
    12121212 * @param int    $id     Optional. Post ID.
     1213 * @param string $class  Optional. Add custom class to link.
    12131214 */
    1214 function edit_post_link( $text = null, $before = '', $after = '', $id = 0 ) {
     1215function edit_post_link( $text = null, $before = '', $after = '', $id = 0, $class = 'post-edit-link' ) {
    12151216        if ( ! $post = get_post( $id ) ) {
    12161217                return;
    12171218        }
     
    12241225                $text = __( 'Edit This' );
    12251226        }
    12261227
    1227         $link = '<a class="post-edit-link" href="' . $url . '">' . $text . '</a>';
     1228        $link = '<a class="' . $class . '" href="' . $url . '">' . $text . '</a>';
    12281229
    12291230        /**
    12301231         * Filter the post edit link anchor tag.