=== Draft2Publish ===
Contributors: draft2plublish
Tags: ai, google gemini, autoblog, content generator, seo writer
Requires at least: 6.0
Tested up to: 6.9
Stable tag: 1.0.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI Content Automation for WordPress. Research and draft articles automatically using your own Google Gemini API key.

== Description ==

Stop writing generic AI content. **Draft2Publish** connects your WordPress site directly to Google's Gemini models (2.5 Flash, 2.5 Pro, 3 Flash, 3 Pro) to generate fact-checked, research-backed articles with full control over publishing.

Unlike other plugins that just "write text," this plugin performs **Deep Research** first—finding real facts, citations, and content gaps before writing a single word.

### 🚀 Key Features
* **Bring Your Own Key:** Use your own Google Gemini API key (free tier friendly). No third-party accounts from us.
* **Gemini-Powered Workflow:** Choose between Gemini 2.5 Flash, 2.5 Pro, 3 Flash, or 3 Pro for research + writing.
* **Flexible Word Count:** Generate articles from 700 to 2,500 words with a simple slider.
* **Flexible Publishing:** Save as Draft, Pending Review, or Published — your choice per-article or globally.
* **Fact-Based Writing:** Generates structured, formatted articles with headings, lists, and reference sections.
* **Featured Image Support:** Automatically generates one featured image per article via Google's image endpoint.
* **Weekly Content Scheduling:** Configure per-day content types, publish times, and categories.
* **Google Search Grounding:** Research step uses real-time Google search for fact-checked, sourced content.

### ⚡ Draft2Publish Pro (Separate Product)
* **Expanded workflow tools** for higher-volume publishing
* **In-content image galleries + bulk prompts**
* **Extended research and editorial tooling**
* **Priority support + roadmap access**

### 🎯 Perfect For:
* Bloggers who want to maintain a consistent publishing schedule
* Marketers building authority sites with E-E-A-T compliance
* Agencies managing multiple client websites
* Publishers scaling content production

### 💡 How It Works:
1. **Research:** Plugin uses Google Search Grounding to find real, verified facts
2. **Write:** AI generates a complete article with proper structure and citations
3. **Publish:** Automatically creates a WordPress post with featured image and tags

== Service Disclosure ==

This plugin relies on the Google Gemini API (a third-party service) to function.

* **Service Name:** Google Gemini API (via Google AI Studio or Vertex AI)
* **Service URL:** https://ai.google.dev/
* **Terms of Service:** https://ai.google.dev/terms
* **Privacy Policy:** https://policies.google.com/privacy

**How it works:**
1. You must provide your own Google API Key in the plugin settings.
2. When you click "Generate," the plugin sends your selected topic, keywords, and configuration to Google's Gemini endpoint.
3. Google processes this data to generate the article text (and optional featured image), which is sent back to your WordPress site.
4. No other site data (user data, traffic, etc.) is shared with Google.

**Data Sent to Google:**
- Article topic/title
- Keywords and category
- Word count preferences
- Writing style preferences
- Image generation prompts (for featured images)

**Data Received from Google:**
- Generated article content (text)
- Research findings and sources
- Suggested titles and headings
- Generated images (base64-encoded, saved to Media Library)

**No data is sent to any other third-party service in this Lite build.**

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/draft2publish` directory, or install the plugin through the WordPress plugins screen.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Go to the "D2P" menu in your WordPress admin.
4. Navigate to the "API Keys" tab.
5. Enter your Google Gemini API Key (get one free at https://ai.google.dev/).
6. Start generating high-quality, fact-checked articles!

== Frequently Asked Questions ==

= Is the Gemini API Key free? =
Yes! Google currently provides a generous free tier for the Gemini API. Free tier availability and limits depend on Google quotas and your account.

= How many articles can I generate? =
There is no plugin-imposed limit on article generation. Your usage depends on your Google Gemini API quota and plan. Google offers a generous free tier — check https://ai.google.dev/pricing for current limits.

= Is there a Pro version? =
Yes. Draft2Publish Pro is a separate product with expanded workflow features, while this Lite build remains focused on a Gemini-powered workflow for WordPress.org.

= Do I need coding knowledge? =
No! Everything works through a simple point-and-click interface in your WordPress admin.

= Will this work with my theme? =
Yes! The plugin generates standard WordPress posts that work with any theme.

= Is the content unique? =
Yes! Every article is generated fresh based on your topic and keywords. The AI doesn't copy existing content.

= Does it support featured images? =
Yes! The plugin can automatically generate and attach one featured image per article using Google's Imagen/Gemini image endpoint.

= Can I schedule posts for future dates? =
Yes! The Content Schedule tab lets you configure per-day content types, publish times, and categories. Articles are generated automatically via WordPress Cron at your scheduled times.

== Screenshots ==

1. Dashboard - Quick overview of your content generation stats
2. API Keys Tab - Configure your AI model connections
3. Quick Generate - Create an article in seconds with custom parameters
4. Content Schedule - Plan your week's content in advance
5. Generated Article - High-quality, fact-checked content with sources

== Changelog ==

= 1.0.0 =
* Initial release of Draft2Publish for WordPress.org
* Gemini-powered AI content automation (2.5 Flash, 2.5 Pro, 3 Flash, 3 Pro)
* Articles from 700 to 2,500 words with flexible publish status
* Weekly content scheduling with per-day configuration
* Featured image generation via Gemini/Imagen
* Google Search Grounding for fact-based research
* About tab with feature summary and Google API key link

== Upgrade Notice ==

= 1.0.0 =
Initial release of Draft2Publish. Get started with AI-powered content automation today!

== Privacy Policy ==

Draft2Publish does not collect, store, or transmit any user data except:
1. The content you explicitly choose to generate (topics, keywords)
2. Your API keys (stored securely in your WordPress database)
3. Basic security/abuse-prevention logs (IP address and user agent) when security logging is enabled in the plugin, used only to detect and prevent unauthorized access attempts.

All AI processing in this Lite build happens through your own API keys with Google Gemini. We never see or store your generated content.

== Support ==

* Free users: Community support via WordPress.org forums
* Pro users: Priority email support at support@draft2publish.ai
* Documentation: https://draft2publish.ai/docs

== Credits ==

Built by the Draft2Publish team.
