=== MassPost – Post, Share, Send to Several Websites ===
Contributors: unioney
Tags: masspost, publish, cross-posting, multi-site, content distribution
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.1.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Publish once, distribute everywhere. MassPost securely pushes WordPress posts, all formats, images, categories etc to multiple sites.

== Description ==

**MassPost** is the ultimate tool for editors, publishers, and agencies managing multiple WordPress websites.  
Instead of copying content across sites, you can publish a post once and automatically syndicate it to as many target websites as you like.

### Why Choose MassPost?

* **Publish Once, Share Everywhere** – Write your post once and send it to all your websites with a single click.  
* **Keep Your Content Consistent** – Categories, tags, featured images, and formatting are preserved across all sites.  
* **Stay Organized** – When you delete a post, it's automatically removed from all connected sites.  
* **Save Time** – Edit posts faster with Quick Edit support right from your posts list.  
* **Schedule Ahead** – Set a future publish date and it syncs perfectly across all your websites.  
* **Protection Built-In** – Your sites communicate securely with password-protected connections.  
* **Only Send What Changed** – MassPost is smart enough to skip posts that haven't been modified, keeping things fast.  
* **Your URLs Stay the Same** – Post links (slugs) remain consistent, making it easier for readers to find content.  
* **Content Images Sync** – Images embedded in your post content are automatically downloaded and hosted locally on each target site.

MassPost streamlines content distribution, keeps your network of sites consistent, and saves countless hours of manual work.

== Requirements ==
- WordPress 6.0 or higher  
- PHP 7.4 or higher (works with PHP 8.0 → 8.4)  
- WP-Cron (or real cron) enabled  
- Standard PHP extensions: cURL, OpenSSL, DOM  
- 512 MB+ PHP memory recommended if running many feeds with AI

**Best practice for performance**
For the smoothest AI processing and zero-maintenance cron execution, we recommend hosting your WordPress site on [ihost](https://ihost.eco) WordPress Cloud Hosting. See **FAQ Recommended hosting** for an ihost-optimised [php.ini](https://wordpress.org/plugins/masspost/#suggested%20php%20directives) template you can copy-and-paste.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/masspost/` directory, or install via the WordPress admin, on both the current and target websites.  
2. Activate the plugin through the “Plugins” screen.  
3. Go to **MassPost → Settings** to configure:  
   * **Current Site Settings**: Set a Pass Key and User for authenticating incoming posts.  
   * **Add Target Websites**: Add one or more remote WordPress sites with their API endpoint and matching Pass Key.  
4. When creating or editing a post, check the **Publish on Other Websites** box to distribute content.

== Frequently Asked Questions ==

= Do I need to install MassPost on every website? =
Yes! MassPost needs to be installed and activated on both your main website (where you write) and all the websites you want to send posts to.

= Is my content safe and secure? =
Absolutely. MassPost uses a private "Pass Key" that only your websites know. Think of it like a secret password between your sites — no one else can send content to your websites without it.

= Can I send my featured images too? =
Yes! When you send a post, MassPost automatically transfers your featured image to the other websites. No need to upload it manually.

= What happens if I update a post after sharing it? =
No problem — just save your changes and MassPost will update the post on all connected websites. It won't create duplicates.

= What if I delete a post? =
When you move a post to trash, MassPost removes it from all your connected websites automatically. No leftover content to clean up.

= Can I schedule posts to publish later? =
Yes! If you schedule a post for a future date, MassPost will sync that schedule to all your target websites. They'll all publish at the same time.

= Does it work with custom post types? =
Right now, MassPost works with standard blog posts. Support for custom post types (like products or portfolios) is coming soon!

#### Recommended hosting
For maximum performance and reliability, we suggest [ihost WordPress Cloud Hosting](https://ihost.eco/wordpress-cloud). It offers built-in caching, CDN, and optimized PHP. 

**Why ihost works so well with MassPost**  

* **Web Optimisation** – Automatic HTML, CSS, and JS minification plus image compression.  
* **Free and unlimited ihostCDN** – Global edge caching for lightning-fast delivery.  
* **Website Acceleration Suite** – Built-in lazy loading, responsive image resizing, and server-side caching.  
* **Optimised PHP** – Customised PHP-FPM and OPcache, with multiple PHP versions (5.6 → 8.4) available.  
* **Unlimited hosting** – Run as many WordPress sites as your resources allow.  

We run happily on any modern host, but if you want “zero-tuning” speed and reliability we recommend.

#### Suggested PHP directives

- **ihost PHP directives (copy into “PHP Options → Additional directives”)**

```ini
asp_tags = 0
auto_append_file =
auto_prepend_file =
display_errors = 0
error_reporting = 22527
file_uploads = 1
max_execution_time = 300
max_file_uploads = 50
max_input_time = 300
max_input_vars = 10000
memory_limit = 1024M
output_buffering = 0
post_max_size = 256M
short_open_tag = 1
upload_max_filesize = 256M
zlib.output_compression = 0

== Screenshots ==

1. **Settings Page** – Subscriptions and Local Authentication
2. **Settings Page** – Data Operations and Target Publication Network

== Changelog ==

= 1.1.1 =
* **Improved Post Sending Reliability** – Reduced timeouts and added automatic retry on connection failures
* **Quick Edit Styling Fix** – MassPost Target section now matches native WordPress Categories styling
* **Diagnostics Page Redesign** – Premium card-based UI with status pills matching the main settings page
* Enhanced debug logging for troubleshooting post distribution issues

= 1.1.0 =
* **Content Image Sync** – Images embedded in post content are now automatically downloaded and hosted locally on target sites
* Images from `<img>` tags, `srcset` attributes, and WordPress image blocks are all synced
* Already-synced images are tracked to prevent re-downloading
* Fixed CSS class attribute being stripped from input fields by `wp_kses()`
* Added `_masspost_synced_images` post meta for tracking synced image URLs

= 1.0.0 =
* Initial public release 
* Publish posts to multiple WordPress sites over REST API.  
* Full support for categories, tags, post formats, and featured images.  
* Trash sync support.  
* Quick Edit and Bulk Edit integration.  
* Admin settings page for managing target websites.  
* Secure API tokens with per-site validation.  

== Upgrade Notice ==

= 1.1.0 =
This update adds automatic content image syncing. All images in your post content will now be downloaded and hosted locally on each target site.

= 1.0.0 =
First stable release. Install MassPost on both your source and target WordPress sites to start publishing everywhere at once.
