mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 20:54:29 +00:00
Plugins: Add plugin icons to the plugin list tables.
To mirror theme list table behaviour, the plugin icon now appears next to plugins in the plugin list tables. For plugins that don't have an icon, or non-W.org plugins, a fallback dashicon is shown. Props melchoyce, afercia, paulwilde, pento, obenland. Fixes #30186. git-svn-id: https://develop.svn.wordpress.org/trunk@41695 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -751,9 +751,17 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
echo "<th scope='row' class='check-column'>$checkbox</th>";
|
||||
break;
|
||||
case 'name':
|
||||
echo "<td class='plugin-title column-primary'><strong>$plugin_name</strong>";
|
||||
echo $this->row_actions( $actions, true );
|
||||
echo "</td>";
|
||||
$icon = '<span class="dashicons dashicons-admin-plugins"></span>';
|
||||
if ( ! empty( $plugin_data['icons']['default'] ) ) {
|
||||
$icon = '<img src="' . esc_url( $plugin_data['icons']['default'] ) . '" alt="" />';
|
||||
}
|
||||
?>
|
||||
<td class="plugin-title column-primary">
|
||||
<?php echo $icon; ?>
|
||||
<strong><?php echo $plugin_name; ?></strong>
|
||||
<?php echo $this->row_actions( $actions, true ); ?>
|
||||
</td>
|
||||
<?php
|
||||
break;
|
||||
case 'description':
|
||||
$classes = 'column-description desc';
|
||||
|
||||
Reference in New Issue
Block a user