=== JetHost Total Care – Security & Enhancements ===
Contributors: jethost
Tags: enhancements, security, performance, optimization, protection
Requires at least: 5.5
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 2.5.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

JetHost Total Care simplifies WordPress management by consolidating features like security, site enhancements and performance into a single plugin.

== Description ==
JetHost Total Care simplifies your WordPress management by consolidating essential features like security, site enhancements and performance into a single, user-friendly plugin. This eliminates the need for multiple plugins, reducing conflicts, improving performance, and streamlining your workflow.


== Key Features:==

= Optimize WordPress Core: =

- Configure AutoSave intervals.
- Enable/disable WordPress revisions.
- Limit revisions number.
- Media Trash control.
- Adjust memory limits for improved performance.
- Enhance security by hiding your WordPress version, disabling directory listing, and controlling error reporting.
- Protect core WordPress files and directories from unauthorized access.
- Disable WordPress emojis to improve frontend performance.
- Remove default Dashicons on the frontend for faster load times.
- Disable WordPress embeds to reduce unnecessary scripts and requests.
- Remove the jQuery Migrate library from the frontend if not needed by the theme or plugins.
- Limit login attempts to block brute-force attacks and protect user accounts.

= WordPress Heartbeat API Control: =

- Manage the frequency of the WordPress Heartbeat API to optimize performance and reduce server load.
- Set different heartbeat intervals or disable it completely for:
	- Admin Dashboard – Maintain responsive experience for admins and editors.
	- Post/Page Editor – Ensure autosave works efficiently without overloading the server.
	- Website Frontend – Minimize unnecessary background requests for visitors.

= Author Security: =

- Prevent user enumeration for enhanced security.
- Disable "List Users" functionality.
- Customize author slugs and base URLs for better control.

= Admin Enhancements: =

- Duplicate any post or page with one click.
- Hide the admin bar on the frontend for all or selected user roles.
- Replace the default WordPress logo with your own on the login screen.
- Disable Theme and Plugin file editors for better security.
- Switch entirely to the Classic Editor by disabling Gutenberg.
- Password protect the entire website from unauthorized access.
- Set custom redirects after login and logout.
- Change the default WordPress login URL to protect against brute-force attacks.
- Under Maintenance Mode – When activated, visitors who are not logged in will see a maintenance notice on the site’s frontend. Logged-in users can continue working in the website without interruptions.
- Disable search engine indexing to discourage search engines from listing the site while it is under construction.
- Enable SVG uploads with automatic sanitization for safe use of vector graphics.

= Comment Management: =

- Disable future comments on posts, pages, and media attachments.
- Optionally hide existing comments for a cleaner frontend and improved performance.

= Image Converter (WebP) =

- Convert uploaded JPEG, PNG, and GIF images to WebP format using Imagick.
- Auto-convert on upload — original image and all thumbnail sizes are converted automatically.
- Bulk convert all existing media library images with a progress bar.
- Configurable conversion quality (75–95).
- "Only keep if smaller" — discard the converted file when it is larger than the original.
- "Auto-delete originals" — remove original files after successful conversion and update WordPress metadata.
- Converted files stored in uploads/jethost-optimized/, mirroring the uploads directory structure.
- Automatic URL rewriting via PHP — visitors see .webp URLs directly in src and srcset attributes. No .htaccess rules required.
- Per-format cleanup — delete WebP files or originals independently.
- Page-load statistics showing total images, already converted, and pending counts.
- Server capability detection — shows WebP support status.

= Database Optimization =

- Check Database Health – Scan your database to see the number of optimizable items.
- One-Click Optimization – Select the items you want to clean and optimize instantly.
	- Optimize Database Tables
    - Clean Post Revisions
    - Clean Auto-draft Posts
    - Clean Trashed Posts
    - Delete Comments Marked as Spam
    - Delete Unapproved Comments
    - Delete Trashed Comments
    - Clean Expired Transients
    - Clean All Transients
- Scheduled Optimization – Automate cleanups by setting optimization frequency (Daily, Weekly, Monthly).
- Last Optimization Log – Quickly view the last optimization date and time.


== Installation ==
= Installing the JetHost Total Care Plugin =

= Method 1: Direct Installation from the WordPress Admin Panel =
1. In the WordPress admin menu, go to Plugins > Add New.
2. Search for "JetHost Total Care".
3. Click Install Now, then Activate.
4. The JetHost Total Care menu item will now be available in your main WordPress admin menu.

= Method 2: Manual Upload and Installation =
1. Download the JetHost Total Care plugin .zip file.
2. Upload the .zip file to the /wp-content/plugins/ directory on your server (via FTP, SFTP, or your hosting control panel\'s file manager).
3. In the main WordPress admin menu, go to Plugins.
4. Activate the JetHost Total Care plugin.
5. The JetHost Total Care menu item will now be available in your main WordPress admin menu.

= Method 3: Upload via the WordPress Admin Panel =
1. Download the JetHost Total Care plugin .zip file.
2. In the main WordPress admin menu, go to Plugins > Add New.
3. Click Upload Plugin at the top of the page.
4. Choose the downloaded .zip file and click Install Now.
5. Click Activate.
6. The JetHost Total Care menu item will now be available in your main WordPress admin menu.

==Screenshots==
1. Site enhancements
2. Security options
3. Contact us for help

== Changelog ==

= 2.5.1 2026-05-07 =
**Fixes**
- Image Converter: simplified the `wp_get_attachment_image_src` filter callback to accept only the image array, preventing fatal errors when other code invokes the filter with unexpected argument types.

= 2.5.0 2026-05-05 =
**New Features**
- Added "Image Converter" page under JetHost Total Care menu for next-gen image optimization.
- WebP format support.
- Auto-convert on upload — original image and all thumbnail sizes are converted using Imagick.
- Bulk conversion tool with progress bar to convert all existing media library images.
- Configurable quality setting (75 / 80 / 85 / 90 / 95).
- "Only keep if smaller" toggle — discards the converted file when it is larger than the original.
- "Auto-delete originals" toggle — removes original files after conversion and updates WordPress metadata so the media library shows correct thumbnails.
- Automatic URL rewriting via PHP filters — images are served with .webp URLs directly in src and srcset attributes. No .htaccess rules required.
- Per-format cleanup — delete WebP files or originals independently with per-format file counts.
- Page-load statistics: total images, already converted, and pending counts.
- Server capability detection showing WebP support status.

= 2.4.1 2026-04-02 =
**Fixes**
- Fixed error 500 returned from admin-ajax when using SVG images

= 2.4.0 2026-03-16 =
**New Features**
- Added "Disable Search Engine Indexing" toggle under Admin Enhancements to discourage search engines from indexing the site.
- Added "Enable SVG Uploads" toggle under Admin Enhancements allowing safe SVG file uploads with automatic sanitization. Disabled by default.

**Enhancements**
- Moved the "Disable Embeds" option to the bottom of the Site Enhancements page for better organization.
- Tested up to WordPress 6.9.

**Fixes**
- Removed redundant blog_public write on every page load.
- Corrections after plugin check review.

= 2.3.1 2025-12-03 =
**Translations fix**

= 2.3.0 2025-08-12 =
**New Features**
- Introduced "Database Optimization" section:
  - Manual tools for optimizing database tables, revisions, comments, transients, and more.
  - Scheduled automatic optimization with options for daily, weekly, or monthly intervals.
  - Displays last optimization time using WordPress date format.
- Added "Under Maintenance Mode" under Admin Enhancements:
  - Replaces frontend with multilingual maintenance page.
  - Auto-detects sites language (EN/BG).

= 2.2.0 2025-07-09 =
**New Features**
- Added option to change the default WordPress login URL to improve login security.
- Introduced a feature to disable comments on posts, pages, and attachments:
  - Option to prevent future comments.
  - Option to hide existing comments.

**Enhancements**
- Improved visibility of the success notice bar with a new dark blue background and white text for better contrast.

= 2.1.0 2025-06-13 =
**New Features**
- Introduced new "Admin Enhancements" section with the following tools:
  - Duplicate posts/pages easily.
  - Hide the admin bar on the frontend for all or selected users.
  - Customize the WordPress login page with your own logo.
  - Disable access to the Theme Editor and Plugin File Editor.
  - Enforce usage of the Classic Editor by disabling Gutenberg.
  - Password-protect the entire website with a single toggle.
  - Configure custom login and logout redirects.

**Security Improvements**
- Added "Limit Login Attempts" to prevent brute-force attacks.

= 2.0.0 2025-05-07 =
**Rebranding to JetHost**

= 1.2.0 2025-05-07 =
**New Features**
- Added control for WordPress Heartbeat API frequency.
  - Configure or disable heartbeat separately for Admin Dashboard, Post/Page Editor, and Website Frontend.

= 1.1.0 2025-04-23 =
**New Features**
- Added option to disable WordPress emojis for performance boost.
- Added option to remove Dashicons from the frontend.
- Added option to disable oEmbed and associated scripts.
- Added option to remove jQuery embed from the frontend.

=1.0.2 2025-04-14=
**Translation**
* Added a Bulgarian translation.

=1.0.1 2025-03-26=
**Bugfixes**
* Fixed issue with <br/> tags appearing in tooltips.
* Removal of hidden messages from other plugins that appeared in our plugin.
* Updated readme.txt with corrections and improvements.
* Added a language template file (.pot) for easier translation.

=1.0.0=
* Initial release
