WordPress.org

Make WordPress Core

Ticket #43532: 43532.2.diff

File 43532.2.diff, 2.3 KB (added by audrasjb, 2 years ago)

Fixes dashicons use

  • src/wp-admin/css/revisions.css

    diff --git a/src/wp-admin/css/revisions.css b/src/wp-admin/css/revisions.css
    index 236d762..bc4738d 100644
    a b table.diff th { 
    220220        font-family: Consolas, Monaco, monospace;
    221221        font-size: 14px;
    222222        line-height: 1.618;
    223         padding: .5em;
     223        padding: .5em .5em .5em 2em;
    224224        vertical-align: top;
    225225        word-wrap: break-word;
    226226}
    table.diff .diff-addedline ins { 
    240240}
    241241
    242242table.diff .diff-deletedline {
     243        position: relative;
    243244        background-color: #ffe9e9;
    244245}
    245246
     247table.diff .diff-deletedline .dashicons {
     248        position: absolute;
     249        top: .8em;
     250        left: .25em;
     251        font-size: 1em;
     252}
     253
    246254table.diff .diff-deletedline del {
    247255        background-color: #faa;
    248256}
    249257
    250258table.diff .diff-addedline {
     259        position: relative;
    251260        background-color: #e9ffe9;
    252261}
    253262
     263table.diff .diff-addedline .dashicons {
     264        position: absolute;
     265        top: .8em;
     266        left: .25em;
     267        font-size: 1em;
     268}
     269
    254270table.diff .diff-addedline ins {
    255271        background-color: #afa;
    256272}
  • src/wp-includes/class-wp-text-diff-renderer-table.php

    diff --git a/src/wp-includes/class-wp-text-diff-renderer-table.php b/src/wp-includes/class-wp-text-diff-renderer-table.php
    index a158ea2..010b25e 100644
    a b class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { 
    9797         * @return string
    9898         */
    9999        public function addedLine( $line ) {
    100                 return "<td class='diff-addedline'>{$line}</td>";
     100                return "<td class='diff-addedline'><span aria-hidden='true' class='dashicons dashicons-plus'></span><span class='screen-reader-text'>" . __( 'Added:' ) . " </span>{$line}</td>";
    101101
    102102        }
    103103
    class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { 
    108108         * @return string
    109109         */
    110110        public function deletedLine( $line ) {
    111                 return "<td class='diff-deletedline'>{$line}</td>";
     111                return "<td class='diff-deletedline'><span aria-hidden='true' class='dashicons dashicons-minus'></span><span class='screen-reader-text'>" . __( 'Deleted:' ) . " </span>{$line}</td>";
    112112        }
    113113
    114114        /**
    class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { 
    118118         * @return string
    119119         */
    120120        public function contextLine( $line ) {
    121                 return "<td class='diff-context'>{$line}</td>";
     121                return "<td class='diff-context'><span class='screen-reader-text'>" . __( 'Unchanged:' ) . " </span>{$line}</td>";
    122122        }
    123123
    124124        /**