=== Neutrope Field Studio ===
Contributors: neutropeinc
Tags: custom fields, meta fields, block, repeater, options page
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add your own input boxes to posts and pages, then show what you typed with a block or a shortcode. No code needed.

== Description ==

Neutrope Field Studio adds your own input boxes to posts, pages, category terms, and a shared settings screen, and puts what you type on the site without any code.

Make a field group, choose where it should appear, add the boxes you want, and they show up while you edit a post or page. To display a value, add the "Field value" block and pick the field from a list. Shortcodes and PHP helpers are still there for people who prefer them.

= Start from a ready-made set =

A new field group opens with a set of starting points: company information, staff profiles, FAQ, store information, product information, contact details, or a button. Each one shows what it will create before you apply it, and nothing is saved until you save, so you can delete, add, reorder, and rename every field first. Starting from an empty field group is always offered.

= Show a value with a block =

The "Field value" block asks two things: whether to show what was entered on the page being edited or a shared site-wide setting, and which field. It lists only the fields that apply, shows the real value as a preview while you write, and needs nothing pasted or memorised.

= Repeating items and groups =

A repeating item holds as many entries as you need — staff members, questions and answers, a product list — and a group bundles a few boxes into one. Both display as readable HTML from the block or the shortcode, so a FAQ comes out as questions and answers and a staff list comes out with photo, name, job title and profile. Inner fields support the same types as top level ones, including the rich text editor.

= Show a box only when it is needed =

Any top level field can be set to appear only when another field in the same group matches a condition, so the edit screen stays short. This controls the edit screen, not the website.

= See your content in the post list =

Any field can be shown as a column on the post list, so you can check what was entered without opening each post. Long content is summarised: a repeating item shows how many entries it holds, a group shows how much is filled in, and rich text shows the beginning of the text.

= Shared site settings =

A field group can appear as its own settings screen instead of on posts, for information the whole site uses such as company name, phone number, and social links. Save it once and show it anywhere with the block or a shortcode.

= Move settings between sites =

A field group can be written to a JSON file and read back on another site. Only the shape of the group travels; content typed into posts is never included, and importing never overwrites an existing field group.

Field types, named as they appear on screen:

* Short text
* Long text
* Number
* Email address
* URL
* Image
* File
* Date
* Time
* Choice (dropdown)
* Choice (pick one)
* Choice (pick several)
* Rich text editor
* Group of fields
* Repeating items

Where fields can appear:

* A post type
* A specific page
* Category, tag, or other taxonomy terms
* A shared settings screen

Output helpers, for people who edit theme files:

`neutrope_field_studio_get_field( 'company_name' );`

`neutrope_field_studio_get_repeater( 'staff_list' );`

`neutrope_field_studio_get_option( 'company_name' );`

`neutrope_field_studio_get_term_field( 'subtitle', $term_id );`

Shortcode examples:

`[neutfist field="company_name"]`

`[neutfist field="main_image" output="img"]`

`[neutfist field="brochure" output="link"]`

`[neutfist option="company_name"]`

== Installation ==

1. Upload the `neutrope-field-studio` folder to `/wp-content/plugins/`.
2. Activate the plugin through the Plugins screen.
3. Go to Field Studio and press "Add New Field Group".
4. Pick a starting point such as FAQ, choose where the fields should appear, and save.
5. Open a post or page, fill the boxes in, then add the "Field value" block where you want the value shown.

== Frequently Asked Questions ==

= Does this plugin connect to external services? =

No. The plugin makes no external requests, and it bundles no third-party libraries — it uses WordPress APIs only.

= Does it include a paid upgrade prompt? =

No. There is no advertising, tracking, or paid upgrade prompt.

= How do I show a value on a page? =

Add the "Field value" block and pick the field from the list. The block shows the real value as a preview while you edit. The `[neutfist field="..."]` shortcode does the same thing if you prefer it, and both produce the same HTML.

= How do I show a repeating item or a group? =

The same way as any other field: the block or the shortcode renders it as readable HTML. No PHP is needed. `neutrope_field_studio_get_repeater()` and `neutrope_field_studio_get_field()` are still available if you would rather loop over the rows in a theme template.

= Where do shared settings values come from? =

A field group whose place to appear is "Site-wide settings" gets its own screen in the admin menu and saves to a single shared option. Show a value with the "Field value" block set to site-wide settings, with `[neutfist option="field_name"]`, or with `neutrope_field_studio_get_option( 'field_name' )`.

= Does the plugin delete my data when I uninstall it? =

No. Field groups and everything typed into posts, terms, and shared settings are left in place.

== Screenshots ==

1. The field group list, with a short introduction for people using the plugin for the first time.
2. Smart Templates: start a new field group from a ready-made set such as company information, FAQ, or store information.
3. Editing a field group — choose where the fields appear and add the input boxes.
4. A repeating item with a rich-text answer, shown here as an FAQ.
5. Display conditions: show a field only when another field matches — here, a phone number that appears only when the contact method is "phone".
6. The "Field value" block, showing the chosen field with a live preview and no shortcode to remember.
7. Shared site-wide settings on their own screen, such as company name, phone number, and social links.
8. Field values shown as columns on the post list, so entries can be checked without opening each post.

== Changelog ==

= 0.3.0 =
* Add Smart Templates to the new field group screen: company information, staff profiles, FAQ, store information, product information, contact details, and button / CTA. Each card explains what it creates and previews it before anything is applied, and nothing is saved until you save.
* The [neutfist] shortcode now displays repeater and group values, so no PHP is needed: FAQ rows render as questions and answers, staff rows render with photo, name, job title, profile and link, and a button group renders as a link. Any other repeater or group renders as a labelled list, with empty values skipped.
* Repeating items and groups can now hold a rich text field, kept in sync as rows are added, removed and reordered, and saved with wp_kses_post().
* Add display conditions: a top level field can be shown only when another field in the same group matches. Values of hidden fields are never cleared, and conditions that would loop are dropped.
* Add settings export and import. A field group can be written to a JSON file and read back on another site; only the field group's shape travels, content typed into posts is never included, and an import always creates a new group rather than overwriting one.
* Add list screen columns: any field can be shown on the post list, with long content summarised.
* Add the "Field value" block, so a value can be placed with no shortcode to remember. It lists only the fields that apply to the post, previews the real value while editing, and produces the same HTML as the shortcode.
* The block can also show a shared site-wide setting, chosen from the same block.
* Shared settings pages gained an introduction and, on both the field group and settings screens, the block is now offered before the shortcode.
* First run is explained: the field group list says what a field group is and what to press, and saving a group with no place to appear now warns instead of failing silently.
* Plainer wording throughout the editor, keyboard buttons for reordering repeating rows, and every string made translatable.

= 0.2.0 =
* Add File, Date, Time, and Group field types.
* Add Options Pages (shared site settings), with a public PHP helper for reading a shared value in a theme template.
* Add specific page and taxonomy term location rules, plus a public PHP helper for reading a value stored on a term.
* Add an in-editor output guide showing shortcode and PHP snippets for each field.
* Smarter shortcode output: auto-detects image, file, and WYSIWYG output, and supports option="".
* Make every string translatable and add a translation template.

= 0.1.0 =
* Initial MVP with field groups, post type rules, meta boxes, field saving, repeaters, helpers, and shortcode output.
