=== Lumen Pages – Bulk SEO Page Generator ===
Contributors: samarora
Tags: seo, bulk pages, landing pages, programmatic, page generator
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Generate many location- or keyword-targeted SEO pages at once from one template and a list of terms. Draft-first, so you review before publishing.

== Description ==

Lumen Pages turns a single template plus a list of terms into a batch of SEO-targeted draft pages — the fast way to stand up "service in {city}" style landing pages without copy-pasting.

Write your title and content once, drop `{term}` wherever the term should appear, paste your list of terms (one per line), and click generate. Every page is created as a **draft** so nothing goes live until you have reviewed it.

**Placeholders**

* `{term}` — the term exactly as typed
* `{Term}` — {Term} adds capitals to a word that has none and leaves a word you capitalised yourself alone: miami becomes Miami, while McAllen, DeLand, O'Fallon and HVAC come out exactly as you typed them. (The one thing it still cannot know: a term typed entirely in lower case has no internal capital to preserve, so `mcallen` becomes `Mcallen`. Type it the way you want it printed and it is left alone. Since 1.0.3 the reverse case is safe — `HVAC` and `MIAMI` are passed through as typed rather than flattened to `Hvac` and `Miami`.)
* `{TERM}` — UPPERCASE

**What you get**

* Bulk-create draft pages or posts from one template — no per-run limit
* Title + content templates with placeholders
* Blank lines are dropped, and two terms that would produce the same page title make one page
* A term whose page title already exists is skipped, so re-running a list after a timeout resumes instead of duplicating
* Every line you paste is accounted for in the result message
* Remembers your last template
* No account, no licence key, no external service, no data leaves your site

There is no paid edition, no checkout and no upsell. Nothing in this plugin will ask you for money. See https://lumenandink.com/plugin for exactly what is and is not built.

== Installation ==

1. Upload the `lumen-pages` folder to `/wp-content/plugins/`, or install the ZIP via Plugins → Add New → Upload Plugin.
2. Activate the plugin through the Plugins screen.
3. Open **Lumen Pages** in the admin menu, enter a title template, a content template, and your list of terms, then click **Generate draft pages**.
4. Review the drafts under Pages (or Posts) and publish the ones you want.

== Frequently Asked Questions ==

= Do generated pages go live automatically? =

No. Every page is created as a draft. You choose what to publish.

= Will {Term} mangle names like McAllen, or acronyms like HVAC? =

Not since 1.0.3, and the two halves were fixed in two different releases.

Versions 1.0.0 and 1.0.1 ran every term through an unconditional Title Case, which turned McAllen into "Mcallen" and DeLand into "Deland". 1.0.2 fixed that: a word already in mixed case is passed through untouched.

1.0.2 still flattened ALL-CAPS words, because it treated "no lower-case letters" as "no case information". `HVAC repair` came out "Hvac Repair", `AC repair` "Ac Repair", `SEO services` "Seo Services" — while the plugin's own admin screen said it never removes capitals. 1.0.3 leaves an all-upper-case word of more than one character exactly as typed. The trade-off, stated plainly: a term pasted as `MIAMI` now stays `MIAMI` rather than becoming `Miami`, because `MIAMI` is also what you typed.

A term typed entirely in lower case still has no internal capital to recover, so `mcallen` becomes `Mcallen`.

= Is this "thin content" that hurts SEO? =

A batch of near-identical pages is exactly the pattern search engines discount, and this plugin cannot stop you making one. It fills a shared template, so what you publish is thin unless you edit every draft first. It creates drafts, never published pages, precisely so that editing step cannot be skipped. It does not write content for you.

What follows is the checklist used on the 91 metro pages at restorationanswers.com, which were built this way. It is a description of a process, not a promise about rankings — that site's traffic is small and no claim is made here about what it earns.

Before publishing a generated page, make at least these differ from every sibling:

* a price or cost range specific to that place, with the source named
* named local detail — neighbourhoods, counties or ZIPs a resident would recognise
* one rule that genuinely varies by location: a permit requirement, a state insurance deadline, a licensing body
* the meta description, written per page rather than templated
* the intro paragraph, so the first thing a reader sees is not the same sentence with a swapped noun

And do not leave these identical across the set: the H1 pattern with only the place name changed, a boilerplate hero, an FAQ block repeated verbatim.

Google's own guidance on this is worth reading before a bulk run — see the doorway pages page in Google Search Central's spam policies: https://developers.google.com/search/docs/essentials/spam-policies#doorways

If you cannot make a page meaningfully different from its neighbours, that page should not exist. Deleting the draft is a legitimate outcome of a run.

= Does it send my data anywhere? =

No. The plugin runs entirely on your own site and makes no external requests.

= Is there a per-run limit? =

No. Every term you paste gets a draft. Version 1.0.0 capped a run at 10 pages; 1.0.1 removed the cap entirely, along with the licence check and upgrade prompt that went with it. Very long lists take a moment, and a host with a short PHP execution limit may still cut a run short — if that happens, run the same list again. Since 1.0.2 that is safe: a term whose page title already exists is skipped rather than duplicated (post_exists), so a second run resumes where the first stopped. The screen also tells you roughly how far the interrupted run got.

= Is there a paid version? =

No. There is no licence key, no checkout and no SKU. This plugin is the whole product.

== Screenshots ==

1. The generator screen: template, terms, and one click to create drafts.
2. The result: one draft page per term, nothing published.

== Changelog ==

= 1.0.3 =
* Fixed: `{Term}` flattened ALL-CAPS words. `HVAC repair` became "Hvac Repair", `AC repair` "Ac Repair", `BBQ catering` "Bbq Catering", `SEO services` "Seo Services", `US 1 corridor` "Us 1 Corridor" — while this plugin's own admin screen said "{Term} only adds capitals, it never removes them". It was reported by someone who had verified the SHA-256 and diffed the published source against the zip, then ran the function on his own client list. An all-upper-case word of more than one character is now passed through exactly as typed. Consequence, stated because it is a real trade-off: `MIAMI` now stays `MIAMI` instead of becoming `Miami`.
* Fixed: the description of `{Term}` existed as three separately hand-written sentences — in the plugin file, in this readme, and on lumenandink.com — and the one in the plugin file was the false one. The rule is now defined once, in `LUMEN_PAGES_TERM_RULE` in lumen-pages.php, echoed by the admin screen and quoted verbatim here and on the website.
* Fixed: 1.0.2's changelog and code comments referred to "the plugin's own example list" / "this plugin's own Florida example corpus". No such file was in the 1.0.2 zip. Corrected, and an example list now actually ships (below).
* Added: `examples/us-metros.txt` — the 91 metro areas restorationanswers.com publishes water-damage cost pages for, one per line, derived from that site's public sitemap (https://restorationanswers.com/sitemap.xml). An example input, not a complete list of anything.
* Expanded the "is this thin content?" answer in this readme into the actual pre-publish checklist used on those 91 pages, with a link to Google's doorway-pages policy.

= 1.0.2 =
* Fixed: `{Term}` destroyed capitals you had already typed. McAllen became "Mcallen", DeLand "Deland", McKinney "Mckinney", LaGrange "Lagrange", DeSoto "Desoto", LaBelle "Labelle" and O'Fallon "O'fallon", using the plugin's own default title template. `{Term}` stopped re-casing a word that was already mixed case. (This entry said "now only adds capitals to a word that has none"; that was not true of ALL-CAPS words until 1.0.3. It also referred to "the plugin's own example list", which 1.0.2 did not ship.)
* Fixed: refreshing the browser after a run silently re-ran the whole batch. Submissions are now processed before output and redirected (post/redirect/get), so a refresh creates nothing.
* Fixed: re-running a list — which the FAQ and the admin screen both tell you to do after a timeout — created a second set of duplicates. A term whose page title already exists is now skipped.
* Fixed: a line containing exactly `0` was silently discarded when the term list was parsed.
* Fixed: "Miami" and "miami" both survived deduplication and then produced two pages with an identical title. Deduplication now happens on the generated title.
* Added: a run interrupted by a PHP time limit leaves a marker, and the next visit to the screen reports roughly how many drafts it managed and that re-running is safe.
* Added: the result message now accounts for every line pasted — created, skipped, duplicate or already existing, out of how many lines.

= 1.0.1 =
* Removed the 10-pages-per-run cap. All supplied terms are now generated.
* Removed the licence check, the self-hosted update channel and the in-admin upgrade prompt — the plugin has no paid tier and no network code of any kind.
* Added the verbatim GPL-2.0 licence text (LICENSE) and a copyright/warranty notice to the plugin file.
* Tested against WordPress 7.0.2.

= 1.0.0 =
* Initial release: bulk draft-page generation from a template and a term list, with {term}/{Term}/{TERM} placeholders.

== Upgrade Notice ==

= 1.0.3 =
Fixes {Term} turning HVAC into "Hvac" — an all-caps word is now left exactly as typed. Note that MIAMI now stays MIAMI too. Recommended for everyone, and required if your term list contains acronyms.

= 1.0.2 =
Fixes {Term} mangling names that already had capitals (McAllen became "Mcallen"), and makes a refresh or a re-run stop creating duplicate drafts. Recommended for everyone.

= 1.0.1 =
Removes the per-run page cap and all licence/upgrade code. Recommended for everyone.
