Initial icon map and documentation added

This commit is contained in:
Stingray82 2025-08-05 17:39:33 +01:00
parent 7641a97b57
commit 4e5f396bad
8 changed files with 133 additions and 2 deletions

55
CONTRIBUTING.md Normal file
View file

@ -0,0 +1,55 @@
# Contributing to MainWP Plugin Icons

Thank you for considering contributing! This project aims to enhance the visual experience of the MainWP dashboard by offering high-quality, community-curated plugin icons.

---

## 📌 What to Contribute

- PNG icons (64x64 or 128x128 preferred) for WordPress plugins
- File should be named using the **plugin slug**, e.g., `woocommerce.png`

---

## 📁 Where to Put Things

- Add icons to the `icons/` folder
- Update `icons-map.json` in the root directory with the plugin slug and raw GitHub URL to the icon

### Example

If you're adding `wordfence.png`:

1. Place the file at:
```
icons/wordfence.png
```

2. Edit `icons-map.json` to include:
```json
{
"wordfence": "https://raw.githubusercontent.com/stingray82/mainwp-plugin-icons/main/icons/wordfence.png"
}
```

---

## ✅ Requirements

- **Naming:** Use lowercase plugin slugs only (no spaces or special characters)
- **Format:** `.png` only
- **Size:** 64x64 or 128x128 recommended (square)

---

## 🚀 Submitting a Pull Request

1. Fork the repository
2. Create a new branch for your icon
3. Add the icon and update `icons-map.json`
4. Commit your changes
5. Open a pull request with a short description

---

Happy contributing! 🎉

View file

@ -1,2 +1,71 @@
# mainwp-plugin-icons
Community-driven plugin icon repository for use with MainWP filters. Contribute icons, customize your MainWP dashboard.
MainWP Plugin Icons
===================

A community-driven icon library for WordPress plugins used in
[MainWP](https://mainwp.com). This repository allows users to override plugin
icons in their MainWP dashboard via custom filters.

How to Use
----------

You can integrate this repo into your WordPress installation using the following
JSON map:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
https://raw.githubusercontent.com/stingray82/mainwp-plugin-icons/main/icons-map.json
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Replace `yourusername` with your actual GitHub username or organization name.

### Example PHP Integration

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ php
add_filter('mainwp_before_save_cached_icons', function($cached_icons, $icon, $slug, $type, $custom_icon, $noexp) {
$json_url = 'https://raw.githubusercontent.com/stingray82/mainwp-plugin-icons/main/icons-map.json';
$json_data = @file_get_contents($json_url);
if (!$json_data) return $cached_icons;

$icon_map = json_decode($json_data, true);
if (!is_array($icon_map)) return $cached_icons;

if (isset($icon_map[$slug])) {
$cached_icons[$slug] = $icon_map[$slug];
}

return $cached_icons;
}, 10, 6);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Repository Structure
----------------------

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mainwp-plugin-icons/
├── icons/ ← Plugin icon images (.png, 64x64 or 128x128)
│ └── akismet.png
├── icons-map.json ← JSON map of plugin slugs to icon URLs
├── README.md
└── CONTRIBUTING.md
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

## Licensing & Copyright

All plugin logos and icons included in this repository are provided **as-is** for the purpose of improving the user experience in the MainWP dashboard.

- The icons remain the **copyright** of their respective plugin authors or organizations.
- No ownership or rights are claimed by this repository or its contributors.
- If you are a plugin author and wish to have your icon **added**, **updated**, or **removed**, please [open an issue](https://github.com/stingray82/mainwp-plugin-icons/issues) or submit a pull request.

This repository is community-driven and intended solely for personal and non-commercial customization.


Contribute
------------

We welcome community contributions! Help us grow the icon collection by
submitting icons for your favorite plugins. See
[CONTRIBUTING.md](CONTRIBUTING.md) for full guidelines.



7
icons-map.json Normal file
View file

@ -0,0 +1,7 @@
{
"admin-site-enhancements-pro": "https://raw.githubusercontent.com/stingray82/mainwp-plugin-icons/main/icons/admin-site-enhancements-pro.png",
"advanced-custom-fields-pro": "https://raw.githubusercontent.com/stingray82/mainwp-plugin-icons/main/icons/advanced-custom-fields-pro.png",
"automaticcss-plugin": "https://raw.githubusercontent.com/stingray82/mainwp-plugin-icons/main/icons/automaticcss-plugin.png",
"ninja-updater": "https://raw.githubusercontent.com/stingray82/mainwp-plugin-icons/main/icons/ninja-updater.png",
"wpcodebox2": "https://raw.githubusercontent.com/stingray82/mainwp-plugin-icons/main/icons/wpcodebox2.png"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
icons/ninja-updater.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
icons/wpcodebox2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB