Skip to content
This repository has been archived by the owner on Sep 27, 2022. It is now read-only.

Commit

Permalink
Put the add-on icons into the img folder. This will allow us to sav…
Browse files Browse the repository at this point in the history
…e some resources on Theme Hybrid but still allow us to add new add-ons without updating the plugin (falls back to the icon passed through the API).
  • Loading branch information
justintadlock committed Jul 11, 2017
1 parent e81cfe1 commit 18eee79
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion admin/views/class-view-addons.php
Expand Up @@ -77,8 +77,14 @@ public function addon_card( $addon ) { ?>
<a href="<?php echo esc_url( $addon->url ); ?>">
<?php echo esc_html( $addon->title ); ?>

<?php if ( $addon->icon_url ) : ?>
<?php if ( file_exists( members_plugin()->dir_path . "img/icon-{$addon->name}.png" ) ) : ?>

<img class="plugin-icon" src="<?php echo esc_url( members_plugin()->dir_uri . "img/icon-{$addon->name}.png" ); ?>" alt="" />

<?php elseif ( $addon->icon_url ) : ?>

<img class="plugin-icon" src="<?php echo esc_url( $addon->icon_url ); ?>" alt="" />

<?php endif; ?>
</a>
</h3>
Expand Down
File renamed without changes
Binary file added img/icon-members-role-hierarchy.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/icon-members-role-levels.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 18eee79

Please sign in to comment.