WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/04/2017 11:42:55 PM (23 months ago)
Author:
pento
Message:

Plugins: Tweak the plugin icons added in [41695].

  • Remove plugins icons from the plugin list table, as there were performance issues loading the icons when the site had lots of plugins.
  • Depending on which icons the plugin has uploaded, prefer them in this order: svg, 128x128, 256x256.
  • Improve the style of the fallback icon for plugins that don't have an icon defined.

Props Travel_girl, danieltj, afercia, karmatosed,hugobaeta, empireoflight, brentjett, melchoyce, pento.
Fixes #30186.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-plugins-list-table.php

    r41695 r41755  
    752752                    break;
    753753                case 'name':
    754                     $icon = '<span class="dashicons dashicons-admin-plugins"></span>';
    755                     if ( ! empty( $plugin_data['icons']['default'] ) ) {
    756                         $icon = '<img src="' . esc_url( $plugin_data['icons']['default'] ) . '" alt="" />';
    757                     }
    758                     ?>
    759                     <td class="plugin-title column-primary">
    760                         <?php echo $icon; ?>
    761                         <strong><?php echo $plugin_name; ?></strong>
    762                         <?php echo $this->row_actions( $actions, true ); ?>
    763                     </td>
    764                     <?php
     754                    echo "<td class='plugin-title column-primary'><strong>$plugin_name</strong>";
     755                    echo $this->row_actions( $actions, true );
     756                    echo "</td>";
    765757                    break;
    766758                case 'description':
Note: See TracChangeset for help on using the changeset viewer.