=== Contenya Publisher ===
Contributors: contenya
Tags: ai content, wordpress posts, content calendar, copywriting, seo
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 0.4.6
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Turn ideas into WordPress posts, campaigns, and an editorial calendar using the Contenya content engine.

== Description ==

Contenya Publisher brings the Contenya content engine into the WordPress admin. From one workspace you can connect your site, generate complete blog posts, create campaigns with selected dates, and review an editorial calendar with the content created through Contenya.

The plugin is designed as a focused publishing workspace inside WordPress while Contenya handles content generation, credits, checkout, and account status. The full Contenya platform also helps users create, schedule, and publish content for social networks and other connected channels, so WordPress can become part of a broader multi-channel workflow.

The plugin does not ask for a WordPress username or password. The connection uses site-specific tokens that can be revoked when the site is disconnected or the plugin is uninstalled.

== Features ==

* Tabbed admin workspace: Connection, Generate Post, Campaign, and Calendar.
* Secure Contenya connection without manually copying tokens.
* Complete post generation with title, clean HTML, excerpt, tags, SEO data, and featured image.
* Editorial campaigns with user-selected dates.
* Calendar view for posts created through Contenya inside WordPress.
* Access to the full Contenya platform for social media and other connected publishing channels.
* WordPress post statuses are respected: draft, pending, published, and scheduled.
* Editor sidebar box to generate or improve text, image, or a complete post.
* Temporary editor lock while content is being generated to prevent accidental changes.
* Plan status, credit status, and quick access to Contenya.
* Protected REST endpoint with a revocable site token for publishing from Contenya.
* Async campaign jobs can continue in Contenya and publish back to WordPress when complete.

== Branding ==

Contenya Publisher uses the Contenya visual identity inside the WordPress admin: a clear interface, violet and blue accents, copy focused on editorial productivity, and direct access to the full platform.

Recommended public assets:

* Official Contenya logo.
* `DOCS/plugin-wordpress/marketing-assets/icon-256x256.png`
* `DOCS/plugin-wordpress/marketing-assets/icon-128x128.png`
* `DOCS/plugin-wordpress/marketing-assets/banner-1544x500.png`
* `DOCS/plugin-wordpress/marketing-assets/banner-772x250.png`
* Real screenshots of the tabbed workspace, calendar view, and editor sidebar.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`.
2. Activate the plugin through the Plugins screen.
3. Open the Contenya menu in WordPress.
4. Click "Connect site with Contenya".
5. Log in or register in Contenya and confirm the connection.
6. Return to WordPress to generate posts or campaigns.

== Frequently Asked Questions ==

= Does this plugin include the AI engine? =

No. The plugin connects to the Contenya API. Contenya remains the content engine and the source of truth for credits, plans, and generation.

= Does the plugin store a global secret? =

No. Each WordPress site receives its own connection token.

= Can users open the full Contenya app? =

Yes. The plugin includes links to the full Contenya dashboard.

= Can I keep using Facebook, Instagram or other social channels in Contenya? =

Yes. The connection managed by this plugin only controls the WordPress/blog channel. Social networks are connected and managed directly in Contenya.

= What happens when I generate inside post-new.php? =

Contenya saves the generated content as a real WordPress draft, so it does not remain only as an auto-draft.

= What happens when I improve an existing post? =

The plugin updates the currently open post. It does not create a new post.

== Security ==

* AJAX actions require the `manage_options` capability and a WordPress nonce.
* The Contenya connection uses a temporary `state` value to prevent invalid callbacks.
* The local REST endpoint requires a site-specific publishing token.
* Generated HTML is filtered with `wp_kses_post`.
* Remote image URLs are validated before download.
* The plugin does not store a WordPress username or password.

== External Services ==

This plugin connects to Contenya services at `https://contenya.com` to connect the WordPress site, generate editorial content, manage credits and open secure checkout sessions.

When you connect or use the plugin, it may send the following data to Contenya: site URL, site ID, site name, plugin version, connection state, user-provided ideas or briefs, selected campaign dates, selected post status, category ID, generated post metadata, WordPress post ID, post status, post URL and credit-related account status.

Contenya processes this data to provide content generation, campaign creation, account status, credit packages, checkout and synchronization between WordPress and the Contenya dashboard.

Service provider: Contenya
Service URL: https://contenya.com
Terms of service: https://contenya.com/terms
Privacy policy: https://contenya.com/privacy

== Changelog ==

= 0.4.6 =
Adjusted the Contenya admin menu icon to an intermediate centered size.

= 0.4.5 =
Centered the Contenya admin menu icon using WordPress SVG background handling.

= 0.4.4 =
Reduced the Contenya admin menu icon visual size.

= 0.4.3 =
Added a Contenya-branded admin menu icon.

= 0.4.2 =
Compact single-column admin header that uses the row width more effectively.

= 0.4.1 =
Improved scheduler-style calendar layout and stronger admin asset cache busting.

= 0.4.0 =
Tabbed admin workspace, editorial calendar, async campaign jobs with background publishing, improved metadata, visual branding, editor lock during generation, and stricter remote image URL security.

= 0.3.0 =
Connection through Contenya login/register, post generation, and campaigns with custom dates.

= 0.1.0 =
Initial installable package.
