=== IndexMachine - Auto Indexer ===
Contributors: indexmachine
Tags: indexing, seo, googlebot, crawl, search engine
Requires at least: 5.6
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.9.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Send your posts and pages to IndexMachine for real, DNS-verified search-engine crawling - automatically on publish. See your balance in WordPress.

== Description ==

IndexMachine drives real, DNS-verified Googlebot (and Bingbot) crawls to the URLs you submit, so your pages get discovered and crawled faster. This plugin connects your WordPress site to your IndexMachine account with an API key.

**Features**

* Add your IndexMachine API key and see your live credit balance right in WordPress.
* Automatically submit new content to IndexMachine when it is published.
* Optionally re-submit when a published item is updated.
* Choose the indexing mode (Normal / Boost / Extra Boost) and an optional drip-feed window (spread submissions over up to 30 days).
* Submit any published post or page manually from its editor, and see the last submission status in a column in your posts list.
* A **URLs** screen listing your published content with Sent / Not-sent filters, pagination, and per-row selection - submit selected, submit all, or just the not-yet-sent ones.
* Import URLs from a **sitemap** (including sitemap indexes) and submit them - with an upfront credit-cost estimate and a progress bar. Sent URLs are tracked, so you can submit only the not-yet-sent ones and preview which are already sent.
* **Send again**: URLs already in your queue are normally skipped and cost nothing - tick "Send again" to deliberately queue another crawl round for them.
* **Block** any post or page so it is never submitted - not even automatically.
* A built-in **Setup guide** and a link to full instructions when the API key isn't set yet.
* Optional **daily limit**: cap how many URLs are sent per day, with a configurable reset hour (default: unlimited).
* Pick which content types are eligible.

You need an IndexMachine account and credits. Signing up is free and takes a minute: **new accounts get 50 free credits** - enough to index 50 URLs - and **no credit card is required** to start. There is no subscription; when you need more, you pay per URL with prepaid credits.

== External services ==

This plugin connects to the IndexMachine API (https://app.indexmachine.net) - a third-party service operated by IndexMachine - to submit your URLs for crawling and to read your credit balance.

* **What is sent, and when:** when you publish or manually submit an item (or when automatic submission is enabled), the plugin sends that item's public URL, and your API key for authentication, to `https://app.indexmachine.net/api/v1/urls`. To display your balance it sends your API key to `https://app.indexmachine.net/api/v1/credits`.
* **What is not sent:** no post content, personal data, or visitor data is sent - only the public URL of the content you choose to submit.
* Use of the service is governed by the IndexMachine Terms of Service (https://indexmachine.net/terms/) and Privacy Policy (https://indexmachine.net/privacy/).

== Installation ==

1. Install and activate the plugin.
2. Go to **IndexMachine** in the admin menu.
3. No account yet? Create one at https://indexmachine.net - it's free, no credit card required, and you get 50 free credits to try it out.
4. Paste your API key (from your IndexMachine dashboard → API). Your balance appears when the key is valid.
5. Choose your indexing mode, optional drip-feed, and whether to submit automatically on publish.
6. Save. New published content is now sent to IndexMachine (or submit items manually from the editor).

== Frequently Asked Questions ==

= Is it free to try? =
Yes. Creating an account is free, takes a minute, and needs no credit card - you get 50 free credits, enough to index 50 URLs. Buy more only when you run out.

= Where do I get an API key? =
Create an account at https://indexmachine.net and open your dashboard → API to generate a personal key.

= I submitted the same URLs again and nothing happened. Why? =
By default the service skips URLs that are already in your queue, so nothing is added and no credits are spent - that is the safety net against paying twice for the same page. If you genuinely want another crawl round for those URLs, tick **Send again** in the confirmation box (Sitemap import / URLs screen), use the **Send again** button in the post's IndexMachine box, or pick the "Send again to IndexMachine" bulk action. It charges credits again.

= Does it cost credits? =
Yes - each submitted URL spends credits according to the selected mode (Normal = 1 credit, Boost = 1.5, Extra Boost = 2). Watch your balance; automatic submission spends credits as you publish.

= Does it send my content? =
No. Only the public URL of the item is sent, plus your API key for authentication.

= What is drip-feed? =
Instead of submitting everything at once, you can spread submissions over 1–30 days for a more natural pace.

== Screenshots ==

1. Settings: paste your API key and your live credit balance appears. Pick the indexing mode, an optional drip-feed window, automatic submission, a daily cap, and which content types are eligible.
2. The URLs screen: filter by All / Not sent / Sent / Blocked, tick rows, and submit them - or send already-sent URLs again for another crawl round.
3. Sitemap import: fetch a sitemap (including sitemap indexes), see which URLs were already sent and what the run will cost in credits, then watch it run.
4. Every post and page gets an IndexMachine box in the editor: submit it, send it again for another crawl round, or block it from ever being indexed.
5. The built-in Setup guide walks you through the account, the API key, and the submission settings.

== Changelog ==

= 1.9.1 =
* The IndexMachine box in the editor now shows one action instead of two: "Submit to IndexMachine" for content that hasn't been sent, "Send again" for content that has. It also switches over straight after a save, without reloading the page.

= 1.9.0 =
* API keys pasted with a stray space or line break are now cleaned on save and on use. Such a key made the edge reject the request with a bare "HTTP 400" that looked like a service outage.
* Failures now say what went wrong instead of showing a count of zero: a rejected key, a rate limit, an unreachable service and a malformed key each get their own message, on the settings screen, the URLs screen, the sitemap import and the posts-list bulk action.

= 1.8.2 =
* Housekeeping: the remaining Plugin Check notices about the custom table and the upgrade routine are now annotated where they actually occur.

= 1.8.1 =
* The content query no longer suppresses filters, so multilingual and other plugins can scope it.
* Renaming post meta during the upgrade now flushes the object cache, so a site with persistent caching can't keep serving the old keys.

= 1.8.0 =
* All scripts are now registered and enqueued through the WordPress asset API instead of being printed inline, and live in their own files under assets/js/.
* Every declaration, option, transient, post meta key, AJAX action, nonce and database table now carries the full `indexmachine_` prefix instead of the old two-letter `im_`. Existing installs are migrated automatically on upgrade: sent/blocked states, submission results and the sent-URL registry are all carried over.

= 1.7.0 =
* New: **Send again**. Previously, re-submitting URLs the service already had was silently skipped - nothing was queued and no credits were spent, with no obvious way to ask for another crawl round. You can now opt in explicitly: a "Send again" checkbox in the bulk confirmation box (Sitemap import and the URLs screen), a "Send again" button in the post's IndexMachine box, a "Send again to IndexMachine" bulk action in the posts list, and a "Send selected again" button on the URLs screen. Re-sending spends credits again and asks for confirmation first.
* The bulk progress line now shows how many URLs were actually queued, and says plainly when everything was already in the queue (so a run that adds nothing no longer looks like a silent success).
* The estimated cost shown before a run now accounts for already-sent URLs, and updates when you tick "Send again".

= 1.6.2 =
* Clearer first-run screen: when no API key is set yet, the plugin explains that an account is free, needs no credit card, and comes with 50 free credits - with a direct "Create a free account" button. Same note added to the Setup guide.

= 1.6.1 =
* Use plain hyphens instead of em dashes throughout (including the plugin name).

= 1.6.0 =
* Optional daily submission limit with a configurable reset hour (site time). Manual, automatic, and bulk submissions all count toward it; default is unlimited.

= 1.5.2 =
* Security hardening: the sitemap fetcher rejects non-http(s) and loopback/private/link-local hosts (SSRF defense-in-depth).

= 1.5.1 =
* Explicit "Submit / Block / Unblock selected" buttons on the URLs screen for ticked rows. When the API key is invalid, the settings screen now links to the setup guide and instructions.

= 1.5.0 =
* The post's IndexMachine status now updates live in the block editor after saving - no page reload needed.

= 1.4.0 =
* Block posts/pages from ever being indexed (meta box, bulk actions, "Blocked" filter). Blocked items are skipped by manual, automatic, and bulk submission.
* Fix: the "Sent" filter now counts items submitted by earlier versions too.
* New in-admin Setup guide + a link to it when the API key isn't configured.

= 1.3.0 =
* Sent-URL registry: every submission is recorded so the Sitemap import can submit only not-yet-sent URLs and preview which are already sent (works for non-WordPress URLs too).

= 1.2.0 =
* New "URLs" screen: list published content with Sent / Not-sent filters, pagination, per-row selection, and "Submit selected / all / not-sent" actions. Sitemap import moved to its own screen. Clearer credit estimates.

= 1.1.0 =
* Bulk tools: submit all existing published content, and import URLs from a sitemap (with cost estimate + progress). Bulk action in the posts list.

= 1.0.0 =
* Initial release: API key + balance, auto-submit on publish, manual submit, indexing modes, drip-feed, status column.
