720 | | echo "<td class='plugin-title column-primary'><strong>$plugin_name</strong>"; |
721 | | echo $this->row_actions( $actions, true ); |
722 | | echo "</td>"; |
| 720 | |
| 721 | include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); //for plugins_api.. |
| 722 | |
| 723 | $args = array( |
| 724 | 'slug' => sanitize_key( $plugin_slug ), |
| 725 | 'fields' => array( 'icons' => true ), |
| 726 | 'locale' => get_locale(), |
| 727 | ); |
| 728 | $info = plugins_api( 'plugin_information', $args ); |
| 729 | |
| 730 | $plugin_icon_url = ''; |
| 731 | if ( ! empty( $info->icons['svg'] ) ) { |
| 732 | $plugin_icon_url = $info->icons['svg']; |
| 733 | } elseif ( ! empty( $info->icons['2x'] ) ) { |
| 734 | $plugin_icon_url = $info->icons['2x']; |
| 735 | } elseif ( ! empty( $info->icons['1x'] ) ) { |
| 736 | $plugin_icon_url = $info->icons['1x']; |
| 737 | } elseif (! empty( $info->icons['default'] ) ) { |
| 738 | $plugin_icon_url = $info->icons['default']; |
| 739 | } |
| 740 | |
| 741 | $icon = ''; |
| 742 | if ( $plugin_icon_url ) { |
| 743 | $icon = '<img src="' . esc_attr( $plugin_icon_url ) . '" alt="" />'; |
| 744 | } |
| 745 | $class = $icon ? ' class="has-media-icon"' : ''; |
| 746 | ?> |
| 747 | <td class='plugin-title column-name column-primary'> |
| 748 | <strong<?php echo $class; ?>> |
| 749 | <?php if ( $icon ) { ?> |
| 750 | <span class="media-icon image-icon"> |
| 751 | <?php echo $icon; ?> |
| 752 | </span> |
| 753 | <?php } ?> |
| 754 | <?php echo $plugin_name; ?> |
| 755 | </strong> |
| 756 | <?php echo $this->row_actions( $actions, true ); ?> |
| 757 | </td> |
| 758 | <?php |