=== APlug Social Publisher ===
Contributors: aplug
Tags: social media, scheduling, publishing, editorial workflow, automation
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Plan and publish network-specific social posts with an editorial calendar, approvals, campaigns, templates, series, media pool and retry logs.

== Description ==

APlug Social Publisher provides a central editorial workflow for preparing and publishing social-media content from WordPress.

Each editorial item has a neutral source version and separate variants per connected account. This allows editors to adjust text length, links, hashtags, media, alternative text and audience notes for each network without changing the original content.

Main features:

* monthly editorial calendar
* drafts, review submissions, approvals and rejections
* scheduled and immediate publication
* separate status and retry history per target account
* controlled worker batches and recovery of interrupted attempts
* campaigns and freely named campaign categories
* reusable post templates
* recurring post series with a limited planning horizon
* media pool based on WordPress attachments
* source drafts from WordPress posts and documented APlug source objects
* encrypted credential storage
* separate capabilities for editors, approvers, publishers and connection administrators
* documented adapter registry for additional networks
* APlug module manifest, events, diagnostics and protected REST routes

Version 1.0.0 includes working adapters for Mastodon and Bluesky plus a local test adapter that never transfers data externally.

The plugin does not promise legal compliance. Site administrators remain responsible for the terms, privacy notices, lawful basis, content rights and account permissions of each connected service.

== External services ==

The plugin connects to external services only when an administrator tests a connection or when an approved post is published. Saving drafts, editing the calendar and using the local test adapter do not transmit content to a social network.

= Mastodon =

The Mastodon adapter sends requests to the instance URL entered by the administrator. The recipient is the operator of that Mastodon instance. Depending on the action, the plugin transmits the access token, account verification request, post text, links, hashtags, media files, alternative text and technical request information.

Mastodon API documentation: https://docs.joinmastodon.org/

Privacy policy and terms depend on the selected Mastodon instance and must be reviewed by the site administrator.

= Bluesky / AT Protocol =

The Bluesky adapter sends requests to the Personal Data Server URL entered by the administrator. The default value is https://bsky.social. Depending on the action, the plugin transmits the handle or email address, app password, post text, links, hashtags, image files, alternative text and technical request information.

Bluesky developer documentation: https://docs.bsky.app/
Bluesky privacy policy: https://bsky.social/about/support/privacy-policy
Bluesky terms: https://bsky.social/about/support/tos

Administrators should use a dedicated app password rather than the primary account password.

= Additional adapters =

Third-party plugins can register additional adapters. Those adapters may introduce other external services. Their developers and site administrators must disclose the corresponding recipients, transmitted data, terms and privacy policies.

== Installation ==

1. Upload the folder `aplug-social-publisher` to `/wp-content/plugins/` or install the ZIP through the WordPress plugin screen.
2. Activate the plugin.
3. Open `APlug Social > Connections`.
4. Create and test a local test channel, Mastodon account or Bluesky account.
5. Create a post, enable one or more connected accounts and save the network variants.
6. Submit and approve the post, then schedule or publish it.

For reliable scheduled publishing, configure a real server cron request for WordPress on low-traffic sites.

== Frequently Asked Questions ==

= Does saving a draft send data to a social network? =

No. External transfer occurs only during an explicit connection test, publication or adapter-specific remote action.

= Are access tokens and app passwords stored in plain text? =

No. Credentials are encrypted with Sodium Secretbox or AES-256-GCM and a key derived from WordPress security salts and the site URL.

= Which networks are included? =

Version 1.0.0 includes Mastodon and Bluesky. The local test channel simulates publication without external transfer. Additional networks use separate adapters.

= Does the plugin publish to personal Facebook, Instagram, LinkedIn, X or Pinterest accounts? =

Not in version 1.0.0. Those services require their own reviewed adapter, permissions and current official API contract. The core is prepared for such adapters without direct coupling.

= Can editors approve their own content? =

Only users with the separate `aplug_social_approve` capability can approve. Administrators receive all capabilities. Editors receive editing, submission and media capabilities by default.

= What happens when publication fails? =

Temporary network and rate-limit errors are retried with increasing delays. Permanent validation or authorization errors are marked as failed. Successful variants are never automatically repeated because another target failed.

= Are posts deleted from the social network when I delete WordPress data? =

No. Remote deletion is never performed silently. Version 1.0.0 blocks silent deletion of already published editorial items.

= Does uninstalling remove all data? =

Not by default. Enable the explicit deletion option under `APlug Social > Settings` before deleting the plugin if all plugin tables, settings and encrypted credentials should be removed.

== Screenshots ==

1. Editorial dashboard with publication statistics and recent errors.
2. Monthly editorial calendar.
3. Post editor with separate network variants.
4. Approval and publication controls.
5. Campaign, template and series management.
6. Media pool with alternative text and rights information.
7. Network connection screen with transparent external-service information.
8. Publication log with retries and correlation IDs.

== Changelog ==

= 1.0.0 =

* Initial installable prototype.
* Added editorial calendar, drafts, approvals, schedules and immediate publication.
* Added campaigns, templates, recurring series and media pool.
* Added encrypted account credentials and separate WordPress capabilities.
* Added Mastodon, Bluesky and local test adapters.
* Added controlled retry worker, APlug interfaces, REST API, privacy tools and documentation.

== Upgrade Notice ==

= 1.0.0 =

Initial release. Test external accounts and scheduled publishing on a staging installation before production use.
