=== Fifteenth Labs Case Studies ===
Contributors: fifteenthlabs
Tags: case study, portfolio, freelancer, photographer, creative
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.6.8
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A guided form for writing case studies, built for web designers, graphic designers, photographers, and illustrators.

== Description ==

Everyone in creative work knows they should write case studies. Most page builders turn it into a chore, and the result reads like a blog post. Fifteenth Labs Case Studies turns it into a form: fill in the brief, the steps, and the outcome, pick your images, and get a consistent, modern case study page — plus an automatic index of everything you've published.

The form itself adapts to what you do. Pick your field once — web design, graphic design, photography, or illustration — and the labels, examples, and even which sections appear change to match. A photographer sees "Conditions" instead of "Constraints" and never sees the numbered process section at all, since a single shoot doesn't have build phases the way a website does. An illustrator sees "Direction" in that same spot. Nothing here is one generic template hoping it fits everyone.

**What you get**

* A one-time setup screen asking what kind of work you do, which shapes labels, examples, and field visibility across the whole plugin to match
* A per-entry override for anyone working across more than one field — any single case study can use its own field's language regardless of what the rest of your site is set to
* A "Case Studies" post type with an automatic index page and each study underneath it
* One guided edit screen, in the order the page renders: client/concept switch, badge, kicker, headline (wrap a phrase in `[brackets]` to emphasise it), summary, four facts, hero image, brief, constraints, pull quote, what you did, two process images with captions, an unlimited additional-images gallery, an embed/shortcode field, steps, a full-width image, outcome, client quote, link, and tools used
* Concept or proposal work automatically swaps "The outcome" for "What this explored", shows a badge, and hides the testimonial field — for speculative or unpaid work you still want to show
* A modern editorial layout: oversized headline with an accent highlight, facts bar, rounded imagery, numbered sections, large-numeral steps, a dark outcome band, tool chips, and a closing call to action
* Settings for accent and dark colours, index heading and intro text, and the closing call-to-action text and link
* Unlimited additional images with captions, shown as a responsive grid that opens in a built-in lightbox — click through with captions, arrow keys, or on-screen navigation
* Index cards use the hero image automatically — no separate thumbnail to manage
* CreativeWork schema on every study, for search engines
* Two shortcodes: `[fl_case_studies count="6" columns="2"]` for a grid anywhere on your site, and `[fl_case_study id="12"]` to embed one full study inside any page
* Theme overrides: copy any file from the plugin's `templates/` folder into `your-theme/fifteenth-labs-case-studies/` to customise the markup directly

= Built for more than one field =

"Case study" is the right word for web and graphic design — it's the term those industries already use. Photographers and illustrators see different language throughout: "Portfolio piece" instead of "Case study," "Conditions" or "Direction" instead of "Constraints," and the numbered "How it came together" process section doesn't show up at all, since a single photo shoot or a single illustration doesn't have build phases the way a website or a brand identity project does.

Every field is still available if you need it — turn on "show every field" in Settings for work that genuinely spans more than one discipline, or set a different field on one specific entry without changing anything else about your site.

== Installation ==

1. Upload and activate the plugin.
2. If you already have a page at `/case-study/`, trash it — the plugin takes over that URL.
3. Go to Case Studies → Add case study, fill in the form, and publish.
4. Go to Case Studies → Settings to set your colours, the index heading and intro, and the closing call to action.

== Frequently Asked Questions ==

= Does this work with my theme? =

Yes. The plugin ships its own page layout, so it works regardless of theme. If your theme provides its own template — a single-fl_case_study.php or archive-fl_case_study.php inside your-theme/fifteenth-labs-case-studies/ — that's used automatically instead, no setting to toggle.

= Does this work with Elementor, Divi, or other page builders? =

The plugin's own guided form and layout don't depend on any page builder, so there's nothing to configure. If you'd rather build the display yourself, use the `[fl_case_study id="12"]` shortcode inside your builder of choice.

= Will deleting the plugin delete my case studies? =

No. Uninstalling only removes the plugin's own settings. Every case study you've written stays in your database exactly as it was, and reappears if you reinstall the plugin later.

= Is this only for web designers? =

No — the free version is built to work for web designers, graphic designers, photographers, and illustrators alike. The "client work" versus "concept" switch and the optional fields are there so the form can flex to fit what you actually do. If you do more than one of these, each entry has its own "Field" dropdown at the top to override the labels for just that piece, independent of your site-wide default.

= Can I request a feature or a layout for my field? =

Yes — go to Case Studies → Settings and use the "Request a feature" link. Real requests directly shape what gets built next, including any future paid add-ons for specific industries.

= What URL do case studies live at? =

By default, it follows your creator type: /case-study/ for web and graphic design, /photography-portfolio/ for photography, /projects/ for illustration. That's only the starting point for a brand-new install, though — the moment you set anything in the Index URL field under Settings, it's yours permanently, and it never changes automatically after that, even if you switch creator type later.

= Can I add more than two process images? =

Yes — the "Additional images" field under Process images lets you add as many as your story needs, each with its own caption, shown as a grid.

= Can I use my existing gallery plugin instead? =

Yes — the "Embed or shortcode" field renders any shortcode you paste into it. If you already use a dedicated gallery plugin (or any other shortcode-based tool), paste its shortcode there and it displays inside the case study.

= Can I change the colours to match my brand? =

Yes, under Case Studies → Settings. There's an accent colour (used for headline highlights and buttons) and a dark colour (used for the outcome band).

== Screenshots ==

1. The guided admin form — field-by-field prompts with inline guidance, plus a Client work / Concept work toggle that adapts which fields appear.
2. A published case study: web design and build, with the facts bar (client, role, timeline, deliverables) and hero image.
3. A published case study for a graphic design project, showing the same layout adapting to a different field.
4. A concept/self-directed case study — for illustration work with no client, using the "What this explored" framing instead of an outcome.
5. A published case study for a photography project, with a full-width gallery image.

== Changelog ==

= 1.6.8 =
* Renamed the plugin to Fifteenth Labs Case Studies for directory approval.
* Moved the Settings and onboarding screens' inline CSS/JS into properly enqueued files.
* Hardened the CreativeWork schema output against a theoretical script-context break-out from filtered data.

= 1.6.7 =
* Fixed: the "Reset and show the onboarding screen again" link on Settings could be clicked with no confirmation, immediately hiding the entire Case Studies list behind the setup screen until a type was re-picked — easy to mistake for lost content. It now asks for confirmation and its label states plainly that existing entries aren't affected.
* Fixed: Photography's default archive URL was the generic "/portfolio/", which can collide with a theme's or Jetpack's own Portfolio post type and break one archive or the other. The default is now "/photography-portfolio/", and the plugin checks at registration time whether its configured slug (default or custom) collides with any other post type's archive, automatically falling back to a "-cs" suffixed version when it does (retrying a few variants if even that happens to collide). Two further passes, on wp_loaded and again on wp, catch a competing post type that another plugin registers later in the same request than ours — between the three, this covers every normal post-type registration timing; a plugin registering its own rewrite-based post type any later than that wouldn't correctly route its own URLs on that request either, independent of us. An admin notice explains what happened and links to Settings whenever a fallback slug gets used.

= 1.6.6 =
* Rewrote the readme Description to reflect the plugin as it actually exists now — the type-adaptation system, the onboarding screen, and the per-entry override weren't mentioned anywhere before, even though they're some of the most distinctive things about it. No code changes.

= 1.6.5 =
* Resolved all 13 warnings from the official WordPress Plugin Check tool (PrefixAllGlobals) by prefixing every flagged local variable in the single case study template — a cosmetic/code-quality fix rather than a functional one, since these variables were always local to the method that includes this template, never true PHP globals.

= 1.6.4 =
* Security: the onboarding screen (the "what kind of work is this for" picker) now consistently requires the same manage_options capability as Settings, closing a gap where an Editor-level user could change the site-wide creator type through onboarding even though the identical setting requires Administrator when changed through Settings directly.
* i18n: wrapped the remaining plain-string field placeholders and examples (the brief, constraints, steps, and tools defaults, plus photography's and illustration's type-specific examples) in proper translation functions — these were visible admin text that had been missed in earlier passes.
* Compatibility: removed the direct dependency on the mbstring PHP extension. Labels are now lowercased through a small wrapper that uses mb_strtolower() when available and falls back to strtolower() when it isn't, rather than assuming every host has mbstring enabled.

= 1.6.3 =
* The "Request a feature" link now points to a real, working form instead of the placeholder URL. That was the last outstanding blocker before this plugin is genuinely ready to submit.

= 1.6.2 =
* Added a capability check alongside the nonce check on the "dismiss quick start notice" handler, for consistency with every other admin action in the plugin. The actual risk was negligible either way — it only ever touches the current logged-in user's own dismissal preference — but this closes the one inconsistency a WordPress.org review would likely flag.

= 1.6.1 =
* Photography adjustments: "The brief" is relabeled "The couple" with wedding-appropriate example text, instead of showing generic wording written for a fix-something project. "Full-width detail" is now hidden by default for photography, since the "Additional images" gallery already covers that role for this type and the field was sitting empty and unused.

= 1.6.0 =
* New: a "Field" dropdown at the top of every entry, letting you override the labels and examples just for that one piece — no more losing an entry's correct terminology every time you switch the site-wide type to test or add something else. Leave it on "Site default" and nothing changes from before; pick an explicit type and that entry keeps its own labels regardless of what the site-wide setting is doing elsewhere.

= 1.5.2 =
* Illustration now has its own "Direction" label and matching examples for what was the generic "Constraints" section — that section previously fell back to default wording that read more like borrowed business-case-study language than something native to how illustrators actually talk about a brief.

= 1.5.1 =
* Fixed the Index URL field not reliably keeping a manually-typed value — in some cases a typed slug that happened to match another type's default (e.g. typing "case-study" while set to Illustration) would get silently overridden back. Removed the auto-follow-on-type-switch behavior entirely rather than keep chasing the exact cause; a brand-new install still gets a sensible default automatically, but once anything is saved, the field is simply and reliably whatever you type, with no exceptions.

= 1.5.0 =
* The index URL now follows your creator type automatically — case-study for web/graphic design, portfolio for photography, projects for illustration. Switching type in Settings updates the URL to match, but only while it's still on a default value; the moment you type a custom slug of your own, it's yours permanently and switching type never touches it again.

= 1.4.4 =
* Accent and Dark colours in Settings now have a hex code text field alongside the colour swatch, kept in sync — type an exact hex value directly instead of only using the browser's colour picker.

= 1.4.3 =
* Widened the text column (760px to 880px) to cut down on the large empty margin on wider screens, and reduced heading and body type sizes, which were reading larger and heavier than intended.

= 1.4.2 =
* Removed the "Use the plugin's page layouts" checkbox. It was a fragile manual toggle — if it was unchecked at the moment any unrelated setting got saved (a normal HTML form quirk), it silently disabled the plugin's entire page rendering with no warning, showing a broken-looking page with unprocessed [bracket] syntax and none of the guided-form fields. The plugin now always uses its own template automatically, and still correctly defers to a theme-provided override if one exists at your-theme/fifteenth-labs-case-studies/single-fl_case_study.php — the safe mechanism this checkbox was trying to provide, without the accidental-breakage risk.

= 1.4.1 =
* Fixed the "Full-width detail" image forcing a hard 16:9 crop on every upload. A tall image — like a full-page website screenshot, the exact use case this field is meant for on web design entries — was being cropped down to a thin, mostly-unusable sliver of the top of the page. It now displays at its own natural height, uncropped, at any aspect ratio.

= 1.4.0 =
* The "Additional images" gallery now opens in a proper lightbox — click any image to see it larger with its caption, arrow-key or on-screen navigation between images, and Escape to close. No dependencies, built directly into the plugin. Aimed especially at brand identity work, where showing a mark applied across many surfaces (packaging, signage, a van wrap) needs more than a static grid.

= 1.3.8 =
* Quick start notice now reads as a plain paragraph instead of a bulleted list.

= 1.3.7 =
* Settings cards are now centered in the available space instead of left-aligned with empty space on the right.
* The Quick start notice is now genuinely full-width, matching the convention used by other plugins, instead of an unexplained narrower box.

= 1.3.6 =
* Widened the Settings screen (760px to 1100px) to use more of the available space on larger screens instead of leaving a large empty gutter on the right. Description text keeps its own comfortable reading width regardless.

= 1.3.5 =
* Redesigned the Settings screen — the plain default WordPress table layout is now a set of branded, icon-led cards matching the onboarding screen's slate/tan styling. Same fields, same functionality, no settings lost or moved.

= 1.3.4 =
* The "What kind of work is this for" dropdown in Settings now has an explicit "— Not set —" option. Previously, an empty/unset value and an actual "Web design" selection were visually indistinguishable, since a browser's dropdown always shows its first option when nothing matches — making it impossible to tell the two states apart while diagnosing the reset link.
* Fixed the settings form silently ignoring an empty selection and reverting to whatever was previously saved.

= 1.3.3 =
* Fixed the "Reset and show the onboarding screen again" link not doing anything when clicked. It had a JavaScript confirmation dialog attached that appears to have been swallowing the click before the link could navigate. Removed it — the action isn't destructive enough to need a confirmation step.

= 1.3.2 =
* Made the base placeholder examples (Kicker, Role, Deliverables, Constraints) genuinely field-neutral. These are what "Web design" and "Not sure yet" both show, and a few leaned web-specific ("Site, brand kit, two videos", a "launch event") in a way that didn't make sense for someone who explicitly said they weren't sure what field they're in yet.

= 1.3.1 =
* Added real usage guidance: a WordPress Help tab (top-right of the Case Studies list and edit screens) covering the shortcodes, the automatic index page, and where Settings live, plus a dismissible on-screen quick-start notice for anyone who wouldn't think to look for a Help tab. Both use the type-aware terminology from 1.3.0.

= 1.3.0 =
* Terminology now adapts per creator type, not just field labels. Photography uses "Portfolio piece" / "Portfolio" throughout the admin (menu name, Add New, Settings heading, etc.), illustration uses "Project" / "Projects". Web and graphic design keep "Case study" / "Case studies", since that's the term genuinely used in those fields. Nothing about the underlying content or data changes — this only affects what it's called on screen.

= 1.2.4 =
* Added the plugin's name and brand to the onboarding screen, so it's clear what you're setting up.
* Rewrote the onboarding explanation in plain language for anyone new to writing case studies — the old text assumed you already understood how the plugin's fields work internally.

= 1.2.3 =
* Redesigned the onboarding screen — icons, card hover states, and the Fifteenth Labs slate/tan styling instead of plain default admin boxes.

= 1.2.2 =
* New: "Reset and show the onboarding screen again" link in Settings — clears the saved creator type so the next visit to Case Studies shows the same picker a fresh install sees, without needing to delete and reinstall the plugin.

= 1.2.1 =
* Fixed a bug where clicking a card on the onboarding screen appeared to do nothing. The setting was actually being saved correctly, but the redirect to "Add new case study" was firing too late in WordPress's page lifecycle to work — moved it to run before any page output starts.

= 1.2.0 =
* New: a one-time "what kind of work is this for?" screen the first time you visit Case Studies — web design, graphic design, photography, or illustration. Shown when you navigate there yourself, never on activation.
* The form now adapts to your choice: labels and examples change (Constraints becomes Conditions for photography, "What I did" becomes "The approach" for photography and illustration), and the numbered "How it came together" section is hidden by default for photography and illustration, where a multi-step build narrative usually doesn't fit.
* Change your type any time, or turn on "show every field" for mixed-discipline work, from Case Studies → Settings.
* Nothing is hidden as a paid upsell — every field remains available to everyone; this only changes sensible defaults.

= 1.1.0 =
* New: unlimited "Additional images" — add as many extra photos as a story needs, each with its own caption, shown as a grid.
* New: "Embed or shortcode" field — paste a shortcode from any other plugin (a gallery, a video embed, a form) and it renders inside the case study.
* Both are additive — existing case studies and their images are untouched.

= 1.0.1 =
* Broadened defaults and example text for photographers, illustrators, and other creative fields, not just web design.
* Added a "Request a feature" link in Settings — a channel for real feature requests that can shape future paid add-ons.
* Added a proper uninstall handler — deleting the plugin now only removes its own settings, never your case studies.
* Updated author links ahead of the Fifteenth Labs public launch.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.6.6 =
Readme content update only, no code changes — safe upgrade.

= 1.6.5 =
Code-quality cleanup only, no functional changes — safe upgrade.

= 1.6.4 =
Security hardening, translation fixes, and a compatibility improvement — recommended for everyone.

= 1.6.3 =
Fixes the placeholder feature-request link — recommended for everyone.

= 1.6.2 =
Minor security hardening, no functional changes — safe upgrade.

= 1.6.1 =
Photography-specific field adjustments — safe upgrade, existing entries unaffected unless their type is set to Photography.

= 1.6.0 =
Adds a per-entry "Field" override so terminology doesn't shift when the site-wide type changes — safe upgrade, existing entries default to following the site-wide setting exactly as before.

= 1.5.2 =
Illustration gets its own "Direction" label instead of generic "Constraints" — safe upgrade.

= 1.5.1 =
Fixes the Index URL field not reliably saving a custom value — recommended for everyone on 1.5.0.

= 1.5.0 =
Index URL now follows creator type automatically, with custom slugs always protected — safe upgrade.

= 1.4.4 =
Adds hex code entry for colours in Settings — safe upgrade.

= 1.4.3 =
Typography and layout width tweaks — safe upgrade.

= 1.4.2 =
Fixes a real bug where case studies could silently render broken with no warning — recommended for everyone.

= 1.4.1 =
Fixes a real cropping bug on the full-width image field — recommended for everyone.

= 1.4.0 =
Adds a lightbox to the additional-images gallery — safe upgrade, purely additive.

= 1.3.8 =
Cosmetic change to the Quick start notice text — safe upgrade.

= 1.3.7 =
Centered settings layout and a full-width Quick start notice — safe upgrade.

= 1.3.6 =
Wider Settings layout — safe upgrade.

= 1.3.5 =
Visual redesign of the Settings screen only — safe upgrade.

= 1.3.4 =
Diagnostic fix for the type dropdown — safe upgrade.

= 1.3.3 =
Fixes the Settings reset link not working — recommended if you hit that.

= 1.3.2 =
Neutral placeholder examples for the base/unsure path — safe upgrade.

= 1.3.1 =
Adds a Help tab and a quick-start notice — safe upgrade.

= 1.3.0 =
Adds per-industry terminology (Portfolio piece, Project, Case study) — safe upgrade, existing content untouched.

= 1.2.4 =
Clearer, friendlier onboarding text and branding — safe upgrade.

= 1.2.3 =
Visual refresh of the onboarding screen only — safe upgrade.

= 1.2.2 =
Adds a proper reset link for the onboarding screen — safe upgrade.

= 1.2.1 =
Fixes the onboarding screen not redirecting after picking a type — recommended for everyone on 1.2.0.

= 1.2.0 =
New onboarding screen adapts the form to your field — safe upgrade, existing case studies unaffected.
