=== Social Publisher ===
Contributors: Enfants Terribles digital GmbH
Tags: linkedin, social media, autopost, automation, ai
Requires at least: 6.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.14.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: social-publisher

Auto-publish WordPress posts to LinkedIn — with AI rewriting, Brand Voice, and scheduling. For social media managers. GDPR-compliant.

== Description ==

Stop copying your WordPress posts to LinkedIn manually.

Social Publisher does it automatically — GDPR-compliant, with custom text, image, and live preview right in your editor.

Built by an agency that got tired of the copy-paste routine. We use it ourselves, every week.

**For social media managers:** Install Social Publisher on each client's WordPress site, set a dedicated Brand Voice per client, and publish LinkedIn content directly where it's written — no extra tool, no copying between platforms. At 9 EUR/month per site, it's a fraction of what centralized scheduling tools charge.

[Plugin walkthrough (German)](https://social-publisher.enfants.de/)

### Features (Free)
- Auto-publish to LinkedIn when you hit "Publish"
- Write a dedicated LinkedIn text — separate from your blog post
- Choose a separate LinkedIn image
- Live preview of your LinkedIn post inside the editor
- Supports personal profiles and company pages
- 100% GDPR-compliant via tracking-free OAuth proxy
- Optional backlink to your post

### Pro — from 9 EUR/month
- AI rewriting with tone presets (Informative, Emotional, Salesy) and custom Brand Voice
- Schedule your LinkedIn post for a specific date and time
- Content recycling — repost evergreen content automatically
- Early adopters keep their price permanently — sign up at 9 EUR, pay 9 EUR forever

### GDPR Compliance
Social Publisher never talks to LinkedIn directly from your WordPress admin.
All OAuth traffic is routed through a tracking-free proxy at **https://social-publisher.enfants.de** — no personal data stored, fully GDPR-compliant.

== Installation ==

1. Upload the plugin directory `social-publisher` to the `/wp-content/plugins/` directory of your WordPress installation.
2. Activate the plugin via the **Plugins** menu in WordPress.
3. Open the settings under **Settings > Social Publisher** and connect your LinkedIn account.
4. When creating a new post, you can enable the **LinkedIn sharing** and set an individual text and image.

== Screenshots ==

1. Admin interface with LinkedIn sharing options
2. LinkedIn post preview in the editor
3. Successful publication of a post on LinkedIn

== Frequently Asked Questions ==

= Who is Social Publisher for? =
Anyone publishing content on WordPress who wants it on LinkedIn without the copy-paste routine — agencies, editorial teams, freelancers, and B2B marketing.

= How does publishing work? =
You write your post in WordPress and publish to LinkedIn directly from the editor. You can define a dedicated LinkedIn text, choose an image, and preview the result before publishing.

= Can I schedule posts? =
Yes. With **Social Publisher Pro**, you can schedule posts and reposts in advance — perfect for editorial planning and consistent visibility on LinkedIn.

= Does Social Publisher support AI rewriting? =
Yes. **Social Publisher Pro** includes AI-assisted rewriting using the **ChatGPT API**. You can refine tone and wording while keeping your message on-brand.

= Do I need my own API key for AI rewriting? =
Yes. You add your own OpenAI API key in the plugin settings. This keeps everything transparent and under your control.

= Is my Featured Image used automatically? =
No. Social Publisher gives you full control over the LinkedIn image. If you don't select one, the post is published without an image.

= Are changes to the post updated on LinkedIn? =
No. Once published, LinkedIn posts cannot be updated from WordPress. Changes must be made directly on LinkedIn.

= Is Social Publisher GDPR compliant? =
Yes. Social Publisher uses a secure, tracking-free OAuth proxy (https://social-publisher.enfants.de) and stores no personal data.

= How much does Pro cost? =
Pro starts at 9 EUR/month and can be cancelled at any time. Early adopters keep their entry price permanently — no matter how often we raise it for new customers.

== Changelog ==

= 1.14.2 =
* Fix: Lifetime licenses were treated as expired and showed the "Upgrade to Pro" box although the license was valid. A license without an expiry date now keeps Pro active.
* Fix: When a license has run out by date, the settings page now says so ("This license expired on ...") instead of "License successfully activated."

= 1.14.1 =
* Fix: The license field no longer claims that a key is "already activated on another domain" when it simply is not valid. You now see whether the key was not found, is active on another domain, or the license server could not be reached.
* Fix: Slow hosts no longer fail the license check as invalid: the license server request now waits up to 15 seconds.
* Change: Browsers no longer auto-fill saved passwords into the license key field.
* New: "Send feedback" card on the settings page and a contact link next to license errors.

= 1.14.0 =
* New: Choose your AI provider for "Improve with AI": OpenAI, Claude, Mistral, your own OpenAI-compatible endpoint or the AI connector set up in WordPress (Settings > Connectors). You can pick the model per provider. Existing OpenAI keys keep working without any change.
* New: The plugin now stores when your LinkedIn connection expires, checks it daily and warns you in the admin and by e-mail 7 days before it runs out, or as soon as LinkedIn rejects it.
* Fix: When LinkedIn rejected the login, the connection disappeared without any notice and posts were silently not shared. You are now told, with a link to reconnect.
* Fix: A post that never reached LinkedIn could still be marked as successfully shared internally.

= 1.13.0 =
* New: LinkedIn panel in the block editor sidebar and in the pre-publish check ("Also share on LinkedIn?"), so you no longer have to find the box in the collapsed meta box area. If LinkedIn is not connected yet, the panel links straight to the connection.
* New: Sharing status per post (queued, shared, error) in the editor, the post list and an admin notice. Errors now show the reason from LinkedIn (e.g. expired connection, missing permission, rate limit) and how to fix it instead of failing silently.
* Fix: Posts were not shared on sites where WP-Cron does not run reliably. Due shares are now also sent while the editor is open or when an admin page is loaded, and a lock prevents duplicate posts.

= 1.12.3 =
* Change: New plugin name "Social Publisher – Auto Post to LinkedIn" so it is easier to find. Slug, settings and data stay the same.
* Fix: After moving a license to a new domain, the plugin kept showing it as invalid even when the license server reported it as valid. Saving the key again now always re-checks it, and a fresh server response always updates the stored status.

= 1.12.2 =
* Fix: The feedback survey and a few admin labels were shown in German on English sites. All interface strings now use English as the source language and are translated via translate.wordpress.org.

= 1.12.1 =
* New: Dismissible notice about IMG Performer (our image optimization and AI labeling plugin) on the Dashboard and the Social Publisher settings page. Shown only to users who can install plugins, only if IMG Performer is not active and not earlier than 7 days after installation. "Remind me later" hides it for 30 days, the close button hides it permanently. No data is sent.

= 1.12.0 =
* New: Only with IMG Performer PRO installed and licensed: posts with an AI-labeled image are uploaded to LinkedIn with the AI label burned into the image instead of the original, because social networks remove metadata on upload. Without IMG Performer: no change.
* Fix: Image posts without any text (neither a LinkedIn text nor post content) were aborted before the image upload
* Fix: Debug logging (socipu_log) had no listener and was invisible

= 1.11.0 =
* New: Anonymous feedback survey on deactivation and for Free users without a Pro upgrade after 14 days. Fully anonymous: no license key, site URL or IP address

= 1.10.0 =
* New: Background queue for LinkedIn posts. Scheduled posts are delivered reliably via cron, also on low-traffic sites
* Fix: enqueue() discarded schedule updates for posts that were already queued

= 1.9.7 =
* Fix: AI rewriting now uses the site's configured language (get_locale()) instead of guessing from the post text — short or ambiguous texts no longer fall back to English on German sites

= 1.9.6 =
* Confirmed compatibility up to WordPress 7.0.2

= 1.9.5 =
* Fix: Editing a published post no longer triggers a duplicate LinkedIn post
* Fix: Scheduling duplicate prevention when saving rapidly

= 1.9.4 =
* Fix: LinkedIn metabox no longer appears on media attachment pages

= 1.9.3 =
* Fix: Brand Voice is now reliably applied to every AI rewrite — the default "clean and professional, no emojis" instruction no longer overrides the Brand Voice setting

= 1.9.2 =
* Fix: AI rewrite now reads LinkedIn text live — no save required before rewriting
* Fix: Brand Voice now reliably applied to every AI rewrite
* New: Backlink URL shown in LinkedIn preview when toggle is active

= 1.9.1 =
* Fix: All upgrade links now point consistently to checkout
* Fix: Plugin URI updated to social-publisher.enfants.de
* Improvement: UTM tracking added to all upgrade links

= 1.9.0 =
* New: LinkedIn preview card redesigned — live preview directly in the editor
* New: ACF dependency removed — metabox is now fully native WordPress
* New: Automatic Pro updates via license server (no more manual ZIP uploads)
* New: Upsell moments for Pro features visible to Free users

= 1.8.4 =
* New: Schedule LinkedIn post on first publish — set a specific date and time directly in the editor (Pro)
* Fix: Double posting prevented — Gutenberg race condition no longer causes duplicate LinkedIn posts
* Fix: Brand Voice field added to AI rewrite — custom writing style injected as system prompt

= 1.8.3 =
* Fix: Pro settings (OpenAI API key field) now correctly visible when license is active
* Fix: Upgrade box no longer shown for active Pro users

= 1.8.2 =
* New: Complete German translation (de_DE) – informal and formal variants
* Improvement: Disconnect button moved next to LinkedIn profile dropdown
* Fix: Added direct file access protection to all PHP includes
* Fix: Timezone-safe date functions (gmdate)
* Fix: wp_unslash() added per WordPress coding standards
* Updated: Tested up to WordPress 6.9

= 1.8.1 =
* Stability & Architecture update
* Fix: License validation decoupled from admin initialization
* Improvement: License checks moved to a non-blocking execution path
* Improvement: Reduced synchronous external requests during admin runtime

= 1.8.0 =
* NEW: Daily automatic license check (Pro) for uninterrupted posting
* NEW: Improved license activation flow with clearer messages
* NEW: Smoother UI for LinkedIn preview and settings
* Improvement: More reliable communication with the license server
* Fix: Edge cases during activation/deactivation resolved

= 1.7.1 =
* NEW: First version of license validation for Pro features
* Improved domain-locking logic for license security

= 1.7.0 =
* Improved metabox layout for faster workflow
* Clearer UI feedback for LinkedIn status and GPT rewriting
* GPT rewriting now respects selected language

= 1.6.1 =
* NEW: Scheduled reposting / content recycling (Pro)
* NEW: Date/time selector for automated reposting

= 1.6.0 =
* NEW: GPT rewriting with text styles (Informative, Emotional, Salesy)
* NEW: API key field in the settings
* NEW: Displaying the active target profile in the editor
* Improved dynamic translation support

= 1.5.0 =
* Complete codebase cleanup according to WordPress.org guidelines
* Unified `socipu_` prefix across all code
* Improved security by switching to `wp_safe_redirect()`
* Moved screenshots to the official SVN assets directory

= 1.4.2 =
* JavaScript cleanup and externalization
* Fixed dropdown delay after authentication
* Improved JS initialization and UI speed

= 1.4.1 =
* NEW: Metabox and ACF fields only appear with an active LinkedIn connection (Pro)
* NEW: Optional backlink feature (Pro)
* NEW: Visual loading indicator during publishing

= 1.3.1 =
* Fixed LinkedIn preview script on external hosts

= 1.3.0 =
* NEW: OAuth flow with automatic profile selection
* Improved ACF integration

= 1.1.0 =
* NEW: Posts are only published once after first save
* Improved LinkedIn publishing security
* Added admin notice for previously published LinkedIn posts

= 1.0.0 =
* Initial release with LinkedIn integration
