=== LoginPosts ===
Contributors: funkydevelopers
Tags: autonews, news, autoblogging, import, loginposts
Requires at least: 5.8
Requires PHP: 7.4
Stable tag: 1.3.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Import AutoNews from LoginPosts and publish it as WordPress posts.

== Description ==

LoginPosts is the official WordPress plugin for AutoNews. It connects your site to a LoginPosts account, reads the articles your tasks have already fetched and rewritten, and publishes them as normal WordPress posts.

Use it when you want a news site that fills itself: categories, authors, featured images, and SEO fields come from LoginPosts, and WordPress stays the place readers see the story.

= AutoNews =

* Import every active LoginPosts task, or import specific article IDs when LoginPosts pushes them.
* Choose import only, or run each task and then import (uses your LoginPosts wallet).
* Plans: latest, database, short, and exclusive. The plan must match your subscription.
* Skip articles that are already on the site, matched by article ID, slug, or original source URL.
* Update an existing post when LoginPosts sends that article again.

= Publishing =

* Post status: publish, draft, pending, or private.
* Featured image is downloaded into the Media Library.
* Title, rewritten content, slug, and publish date are stored on the post.
* SEO title and description are saved as post meta. The description is also used as the excerpt.
* Per-task author, with a fallback author when a task has none.
* Category from a fixed task category, a slug map, the matching WordPress category, synced category IDs, then your default category.

= Schedule =

* WP-Cron every 15 minutes, every 30 minutes, hourly, twice daily, or daily.
* A secret remote import URL for real server cron: /loginposts-feed/import-cron
* REST trigger: /wp-json/loginposts/v1/import?token=YOUR_TOKEN
* Author list and category sync URLs so LoginPosts can pair this site.

= In wp-admin =

Settings → LoginPosts shows your wallet balance, subscription, plan, active tasks, and the categories that will be sent to LoginPosts. Buttons: Save, Test connection, Sync categories, Import now, and Regenerate token.

== Installation ==

1. Download loginposts.zip from https://loginposts.com/plugin
2. In WordPress go to Plugins → Add New → Upload Plugin and choose the zip.
3. Activate LoginPosts.
4. Open Settings → LoginPosts.
5. Set the API base URL (https://loginposts.com/api/v1), your API key, and the client source that matches your LoginPosts connection.
6. Choose the plan, post status, default category, fallback author, and cron interval.
7. Save, then use Test connection and Sync categories.
8. Use Import now, or wait for WP-Cron. For a reliable schedule, call the remote import URL from server cron.

== Frequently Asked Questions ==

= Does the plugin fetch RSS by itself? =

No. LoginPosts fetches sources, rewrites the articles, and this plugin publishes the finished AutoNews into WordPress.

= Will the same story be posted twice? =

Imports skip a post that already exists for that LoginPosts article ID, slug, or original URL. A later push of the same article ID updates the post instead of creating a second one.

= Which WordPress user is the author? =

Each LoginPosts task can name one WordPress user who can publish. That user becomes the post author. The fallback author is used only when the task has no author.

= What if WP-Cron does not run on time? =

Call the remote import URL from your host’s cron. The URL is shown on Settings → LoginPosts and includes the secret token.

== Changelog ==

Add a new "= x.y.z =" section here and set the same Version in loginposts.php. The plugin page and the download zip follow these files. Optional first bullet: Released: December 3, 2026.

= 1.3.1 =
* Released: December 3, 2026
* AutoNews import from active LoginPosts tasks into WordPress posts.
* Schedules from every 15 minutes through daily, plus a token-protected remote import URL and REST trigger.
* Category sync, slug map, fixed task categories, and a default category.
* Per-task author with a fallback author.
* Featured image sideload, SEO title and description, and excerpt from the SEO description.
* Duplicate protection by article ID, slug, and original URL. Repeat pushes update the existing post.
* Wallet, subscription, plan, and task status on Settings → LoginPosts.
* Import only, or run each task and then import.

== Upgrade Notice ==

= 1.3.1 =
Current AutoNews release. Upload the zip and activate. Existing settings are kept.
