-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for plugin icons. As requested in #59
Put the icons in the new `icons` subdirectory.
- Loading branch information
1 parent
ee8af57
commit 230dc36
Showing
2 changed files
with
91 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
The `icons` directory is the place to store plugin icons. When the user goes to "Dashboard -> Updates", the appropriate icon will be displayed next to the plugin name in the list of available updates. Icons are optional. If your plugin doesn't have an icon, WordPress will display a placeholder image. | ||
|
||
Icons must be in the PNG, JPG or SVG format. Each plugin can have up to three icon files: | ||
|
||
- `$slug-128x128.png` or `$slug-128x128.jpg` | ||
- `$slug-256x256.png` or `$slug-256x256.jpg` | ||
- `$slug.svg` | ||
|
||
See the [WordPress.org documentation on plugin assets](https://developer.wordpress.org/plugins/wordpress-org/plugin-assets/#plugin-icons) for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
230dc36
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this new feature take into account the icons included in the plugin package itself? That is, files like
/assets/icon.svg
, included within the ZIP file?230dc36
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it doesn't consider the ZIP file at all.
230dc36
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I will see if I can find a way to extract the icon packaged with the plugin, like wordpress.org does, and save it in the
/icons
folder. 👍230dc36
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct me if I'm wrong, but I think that's not quite what wordpress.org does. It has a separate
assets
folder that's outside the plugin itself, i.e. not part oftrunk
. These assets are not included in the ZIP file.230dc36
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, dear, you're right. I read
assets
and I assumed it would be the plugin'sassets
folder. I just saw the note from their site:I stopped using SVN so long ago, I tend to associate "trunk" with "everything included in the main branch". Now it's clearer.
All good then, I can just upload the icons to the
icons
folder on the server. Much easier.230dc36
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way, while we are at it: is the new "icons" feature part of version 1.3 stable, or only
dev-master
? I'm using Composer to include it, I would like to make sure I use the right version. Thanks.230dc36
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it was added after 1.3 was released. I should probably tag a new release; I'll see if I can do it sometime this week.