WordPress.org

Make WordPress Core

Ticket #43376: 43376_button_element.diff

File 43376_button_element.diff, 1.1 KB (added by audrasjb, 3 years ago)

Version 2: Replace link with button HTML element (with button-link class)

  • src/wp-admin/includes/class-wp-comments-list-table.php

    diff --git a/src/wp-admin/includes/class-wp-comments-list-table.php b/src/wp-admin/includes/class-wp-comments-list-table.php
    index 5070b94..bb971f1 100644
    a b if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_us 
    635635                if ( 'spam' !== $the_comment_status && 'trash' !== $the_comment_status ) {
    636636                        $actions['edit'] = "<a href='comment.php?action=editcomment&amp;c={$comment->comment_ID}' aria-label='" . esc_attr__( 'Edit this comment' ) . "'>" . __( 'Edit' ) . '</a>';
    637637
    638                         $format = '<a data-comment-id="%d" data-post-id="%d" data-action="%s" class="%s" aria-label="%s" href="#">%s</a>';
     638                        $format = '<button data-comment-id="%d" data-post-id="%d" data-action="%s" class="%s button-link" aria-label="%s">%s</button>';
    639639
    640640                        $actions['quickedit'] = sprintf( $format, $comment->comment_ID, $comment->comment_post_ID, 'edit', 'vim-q comment-inline', esc_attr__( 'Quick edit this comment inline' ), __( 'Quick&nbsp;Edit' ) );
    641641