# Medias ToolBox

![PHP Version](https://img.shields.io/badge/php-8.4%2B-blue)
![License](https://img.shields.io/badge/license-MIT-green)

Medias Toolbox allows you to sanitize and rename media files automatically during upload.

* * *

## Description

Medias Toolbox allows you to sanitize and rename media files automatically during upload using several predefined patterns. Furthermore, Medias Toolbox offers you the option to compress your JPG and PNG image files to optimize your website and page loading time.

* * *

## Installation

1. Upload the **`medias-toolbox`** folder to the **`/wp-content/plugins/`** directory.  
2. Activate the plugin through the **Plugins** menu in WordPress.  
3. Navigate to the **Medias Toolbox** menu located in your dashboard sidebar to use or configure the plugin options.  

* * *

## Screenshots

1. Table showing all the pictures and their status (Compressed or not yet).  
2. A general view of the plugin "options" page.  

* * *

## Supported Patterns

- **Current Date/Time + Sanitized filename**  
  *e.g.* `201907092140-original-filename-sanitized.jpg`

- **Current Timestamp + Sanitized filename**  
  *e.g.* `1562708406-original-filename-sanitized.jpg`

- **Current Date/Time + Unique Random String**  
  *e.g.* `201907092140-95560d5755951e92fcc443295eb6685e.jpg`

- **Current Timestamp + Unique Random String**  
  *e.g.* `1562708406-95560d5755951e92fcc443295eb6685e.jpg`

- **Current Date/Time + Encrypted filename**  
  *e.g.* `201907092140-95560d5755951e92fcc443295eb6685e.jpg`

- **Current Timestamp + Encrypted filename**  
  *e.g.* `1562708406-95560d5755951e92fcc443295eb6685e.jpg`

* * *

## Supported File Types

### Images
- `.jpg`  
- `.jpeg`  
- `.png`  
- `.gif`

### Documents
- `.pdf`  
- `.doc`  
- `.docx`  
- `.ppt`  
- `.pptx`  
- `.pps`  
- `.ppsx`  
- `.odt`  
- `.xls`  
- `.xlsx`

### Audio
- `.mp3`  
- `.m4a`  
- `.ogg`  
- `.wav`

### Video
- `.mp4`  
- `.m4v`  
- `.mov`  
- `.wmv`  
- `.avi`  
- `.mpg`  
- `.ogv`  
- `.3gp`  
- `.3g2`

* * *

## Changelog

### 1.7.8 (2025-04-25)

- Code revision and optimization

### 1.7.7 (2025-04-25)

- Code revision and optimization

### 1.7.6 (2025-03-23)

- Code revision and optimization

### 1.7.5 (2024-03-23)

- Code revision and optimization

### 1.7.4 (2023-09-08)

- Code revision and optimization

### 1.7.3 (2023-09-06)

- Code revision and optimization

### 1.7.2 (2023-04-29)

- Code revision and optimization

### 1.7.1 (2023-04-16)

- Code revision and optimization

### 1.7.0 (2023-04-08)

- Code revision and optimization

### 1.6.9 (2023-03-01)

- Code revision and optimization

### 1.6.8 (2023-02-21)

- Code revision and optimization

### 1.6.7 (2023-02-21)

- Code revision and optimization

### 1.6.6 (2023-01-24)

- Code revision and optimization

### 1.6.5 (2023-01-21)

- Code revision and optimization

### 1.6.4 (2022-12-24)

- Code revision and optimization

### 1.6.3 (2022-12-12)

- Code revision and optimization

### 1.6.2 (2022-12-11)

- Code revision and optimization

### 1.6.1 (2022-12-11)

- Code revision and optimization

### 1.6.0 (2022-12-11)

- Code revision and optimization

### 1.5.9 (2022-12-10)

- Code revision and optimization

### 1.5.8 (2022-11-27)

- Code revision and optimization

### 1.5.7 (2022-11-18)

- Code revision and optimization

### 1.5.6 (2022-11-04)

- PHP improvement on core class  
- Code revision and optimization  
- CSS optimization  
- JS optimization  

### 1.5.5 (2022-10-24)

- Code revision and optimization

### 1.5.4 (2022-10-22)

- Removed 'About' section  
- Removed useless PHP function  
- Code revision and optimization  

### 1.5.3 (2022-10-18)

- Code revision and optimization

### 1.5.2 (2022-10-18)

- Code revision and optimization

### 1.5.1 (2022-10-09)

- Code revision and optimization

### 1.5.0 (2021-08-25)

- Code revision and optimization

### 1.4.9 (2021-07-23)

- Code revision and optimization

### 1.4.8 (2021-07-20)

- Optimized core class  
- Fixed PHP issue in the admin section  
- Code revision and optimization  

### 1.4.7 (2021-07-16)

- Code revision and optimization

### 1.4.6 (2021-07-08)

- Code revision and optimization

### 1.4.5 (2021-07-06)

- Optimized activation class  
- Optimized deactivation class  
- Optimized core class  
- Code revision and optimization  

### 1.4.4 (2021-07-05)

- Code revision and optimization

### 1.4.3 (2021-07-04)

- Code revision and optimization

### 1.4.2 (2021-07-02)

- Fixed PHP issue in the admin section

### 1.5.0 (2021-06-23)

- Code optimization

### 1.4.0 (2021-06-23)

- Code optimization

### 1.3.9 (2021-06-22)

- Code optimization

### 1.3.8 (2021-06-19)

- Code optimization

### 1.3.7 (2021-06-17)

- Code correction

### 1.3.6 (2021-06-17)

- Code correction

### 1.3.5 (2021-06-17)

- Added PHP plugin identifier

### 1.3.4 (2021-06-16)

- Renamed activation class  
- Renamed deactivation class  

### 1.3.3 (2021-06-15)

- Fixed PHP Define duplicate

### 1.3.2 (2021-06-13)

- Fixed PHP Define duplicate

### 1.3.1 (2021-06-13)

- Code revision and optimization  
- Updated to the latest version of FontAwesome  
- Backtest compatibility with WP 5.7.2  

### 1.3.0 (2019-08-18)

- Modified `return_about_page()` function

### 1.2.9 (2019-07-22)

- Updated main CSS file `dashboard.css`  
- Updated main CSS file `standalone.css`  

### 1.2.8 (2019-07-14)

- Updated main CSS file `dashboard.css`  
- Updated main CSS file `standalone.css`  

### 1.2.7 (2019-07-09)

- Fixed wrong use of `get_admin_url()`  
- Updated main CSS file `dashboard.css`  
- Updated main CSS file `standalone.css`  
- Updated core language  
- Updated Spanish language translation  
- Updated French language translation  

### 1.2.6 (2019-07-02)

- Updated main CSS file `dashboard.css`  
- Updated main CSS file `standalone.css`  

### 1.2.5 (2019-07-01)

- Fixed a bug in `admin/class-medias-toolbox-admin.php`

### 1.2.4 (2019-06-30)

- Updated main CSS file `dashboard.css`  
- Updated main CSS file `standalone.css`  

### 1.2.3 (2019-06-18)

- Updated main CSS file `dashboard.css`  
- Updated plugin form  
- Updated core language  
- Updated Spanish language translation  
- Updated French language translation  

### 1.2.2 (2019-06-17)

- Initial Public Release

* * *

## Contributing

Contributions are welcome! Please follow these steps:

1. Fork the repository.
2. Create a new branch (`git checkout -b feature/your-feature`).
3. Make your changes and commit them (`git commit -m "Add your feature"`).
4. Push to your branch (`git push origin feature/your-feature`).
5. Open a pull request with a clear description of your changes.

Ensure your code follows PEP 8 style guidelines and includes appropriate tests.

* * *

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

* * *

## Contact

For any issues, suggestions, or questions regarding the project, please open a new issue on the official GitHub repository or reach out directly to the maintainer through the [GitHub Issues](issues) page for further assistance and follow-up.