Opened 3 years ago
Closed 3 years ago
#54140 closed defect (bug) (fixed)
Display is broken when wp_text_diff() is used in the admin screen
Reported by: | mt8.biz | Owned by: | joedolson |
---|---|---|---|
Milestone: | 5.9 | Priority: | normal |
Severity: | normal | Version: | 5.7 |
Component: | Revisions | Keywords: | has-patch commit |
Focuses: | ui, css, administration | Cc: |
Description
If I use the following code, the output will be different between 5.6.5 and later versions.
<?php add_action( 'wp_dashboard_setup', function () { wp_add_dashboard_widget( 'wp_text_diff_test', 'Test of wp_text_diff()', function() { print wp_text_diff( 'a' , 'b' ); } ); });
Attachments (5)
Change History (12)
#1
@
3 years ago
This problem is caused by the following commit, which removes $this->emptyLine() and no longer outputs an empty td.
https://github.com/WordPress/WordPress/commit/35aaaacc044c12e1b4c4a3cd3b90578a7e79a65e
The second of the td's had a CSS to make it 4% wide.
I suggest remove the CSS code in the patch as it is not needed.
#2
@
3 years ago
- Component changed from General to Revisions
- Focuses ui css administration added
- Version set to 5.7
#3
@
3 years ago
Out put codes
5.6.5
<tr> <td class="diff-deletedline"> <span aria-hidden="true" class="dashicons dashicons-minus"></span> <span class="screen-reader-text">Deleted: </span>a </td> <td> </td> <td class="diff-addedline"> <span aria-hidden="true" class="dashicons dashicons-plus"></span> <span class="screen-reader-text">Added: </span>b </td> </tr>
5.8.1
<tr> <td class="diff-deletedline"> <span aria-hidden="true" class="dashicons dashicons-minus"></span> <span class="screen-reader-text">Deleted: </span>a </td> <td class="diff-addedline"> <span aria-hidden="true" class="dashicons dashicons-plus"></span> <span class="screen-reader-text">Added: </span>b </td> </tr>
Note: See
TracTickets for help on using
tickets.
5.6.5