Skip to content

Commit 7289643

Browse files
committed
Plugins: Ensure only plugin icons are floated.
There's no reason not to add a semantic class to the plugin icons on the update screen instead of making our CSS more complex, so let's do that and ensure that the existing `.plugin-icon` styles are scoped to `.plugin-card` on the install screen. Partially reverts [60673]. Fixes #63120. git-svn-id: https://develop.svn.wordpress.org/trunk@60680 602fd350-edb4-49c9-b593-d223f7449a82
1 parent a76e922 commit 7289643

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/wp-admin/css/list-tables.css

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,9 +1315,7 @@ ul.cat-checklist input[name="post_category[]"]:indeterminate::before {
13151315

13161316
/* modified for the emoji */
13171317
.plugins .plugin-title .dashicons,
1318-
.plugins .plugin-title img.dashicons,
1319-
.plugins .plugin-title img[class*="icon"],
1320-
.plugins .plugin-title img[src*="data:image"] {
1318+
.plugins .plugin-title img.plugin-icon {
13211319
float: left;
13221320
padding: 0 10px 0 0;
13231321
width: 64px;
@@ -1741,7 +1739,7 @@ div.action-links,
17411739
margin: 20px 20px 0;
17421740
}
17431741

1744-
.plugin-icon {
1742+
.plugin-card .plugin-icon {
17451743
position: absolute;
17461744
top: 20px;
17471745
left: 20px;

src/wp-admin/update-core.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ function list_plugin_updates() {
518518
$preferred_icons = array( 'svg', '2x', '1x', 'default' );
519519
foreach ( $preferred_icons as $preferred_icon ) {
520520
if ( ! empty( $plugin_data->update->icons[ $preferred_icon ] ) ) {
521-
$icon = '<img src="' . esc_url( $plugin_data->update->icons[ $preferred_icon ] ) . '" alt="" />';
521+
$icon = '<img src="' . esc_url( $plugin_data->update->icons[ $preferred_icon ] ) . '" alt="" class="plugin-icon" />';
522522
break;
523523
}
524524
}

0 commit comments

Comments
 (0)