=== Modern Fields, Custom Fields for Gutenberg ===
Author URI: https://modern-fields.com
Plugin URI: https://modern-fields.com
Author: Maximebj
Tags: custom fields, custom post types, acf, block bindings, metabox
Requires at least: 6.8
Tested up to: 7.1
Stable tag: 1.6.0
Requires PHP: 8.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Design custom field groups in the block editor, fill them in with native WordPress UI, and display them without code through block bindings.

== Description ==

Modern Fields™ is a custom fields plugin built for the WordPress block editor. **Create** your field groups by designing them visually, **manage** them with the native WordPress interface, and **consume** them without code, through block bindings and the core blocks you already use.

Coming from Advanced Custom Fields or Secure Custom Fields? Modern Fields speaks your language: `get_field()`, `the_field()`, field names as you write them, ACF-shaped map values. Modern Fields Pro migrates a whole site from ACF or SCF in a few steps.

[youtube https://youtu.be/vMYajLYcwRA]

=== Create: design your field groups visually ===

* Build field groups in the block editor itself: every field is a block you insert, move and set up, and the form looks like what your editors will fill in.
* More than 30 field types: text, textarea, rich text, number, range, email, URL, link, select, checkboxes, radio buttons, button group, toggle, multi token, date, time, image, gallery, file, embed, map, icon, color picker, color palette, border, spacing, unit, user, taxonomy, post reference, post or archive link, and reverse relation.
* Lay your forms out with core blocks: columns, groups, headings, separators, accordions, and tabs on WordPress 7.1.
* Map field with OpenStreetMap out of the box, or Google Maps with your own key.
* Bidirectional relations: a Reverse Relation field shows and edits, from the other side, the posts pointing at the current one.
* Register custom post types and taxonomies from the same admin, no extra plugin needed.
* Keep everything in version control: JSON sync folder, import and export with a preview of every change, and WP-CLI commands.

=== Manage: fill them in with the native WordPress interface ===

* Fields built from WordPress' own components: they look and behave like the rest of the block editor and the admin.
* Show field groups on posts, pages, custom post types, page templates, categories, tags and terms, users and profiles, media, and dashboard widgets, with fine-grained location rules (status, terms, templates, roles).
* Works in the block editor and in the classic editor through metaboxes, WooCommerce products included.
* Role-aware: choose which roles fill in each field group. Only the users who administer Modern Fields create or edit field groups.
* Predictable and secure data: every value is checked against its field type on every screen, and stored as standard WordPress metadata.

=== Consume: display your fields without code ===

* The Field Value block shows a field of the current post in your content, your templates and your Query Loops.
* Block bindings: it binds the field to a core block (Paragraph, Heading, Image or Button), so the value takes your theme's design.
* Built for full site editing: fields work in the Site Editor and in block templates.
* In PHP, `get_field()`, `the_field()` and `get_field_group()` read your values in classic themes and custom blocks.
* With Modern Fields Pro, filter and sort the Query Loop block by field values right in its settings, and display the fields of the post author or of an options page.

=== Why Modern Fields rather than ACF? ===

* Field groups designed visually, in the block editor, instead of a settings form
* Native WordPress controls for the people filling the fields in
* Block bindings and the Field Value block: no template code to display a value
* OpenStreetMap maps with no API key
* Custom post types and taxonomies included
* `get_field()` and `the_field()` keep working, and Pro's ACF Migration moves your field groups and their values

=== Modern Fields Pro ===

[Modern Fields Pro](https://modern-fields.com) adds what agencies need on bigger projects:

* Repeater, Relation and Block Editor fields, and conditional logic
* Options pages, under any admin menu
* More places in the block editor: modal, drawer and sidebar panels
* Query Loop filters and ordering by field value
* The Advanced Field Value block: fields of the post author or of an options page, and fields shown through the File, Embed, Gallery and Icon blocks
* Fields attached to blocks, and custom blocks built from field groups, without code
* ACF Migration (beta): from ACF or Secure Custom Fields, field groups, values, options pages, post types and taxonomies, with a plan before anything is written and a way back
* Available in French, Spanish, German and Italian

== Installation ==

1. Install Modern Fields from the **Plugins › Add New** screen, or upload the plugin files to the `/wp-content/plugins/modern-fields` directory.
2. Activate the plugin through the **Plugins** screen.
3. Go to **Modern Fields › Field Groups** to create your first group, and add fields as blocks.
4. Choose where the group shows (posts, pages, terms, users...) and publish it.
5. Edit a post or a page matching your rules to fill the fields in.
6. Display a value with the Field Value block or a block binding, or with `get_field()` in PHP.

== Frequently Asked Questions ==

= Is Modern Fields an alternative to ACF? =
Yes. Modern Fields covers what most sites use ACF for (field groups, location rules, field types, `get_field()` and `the_field()`), with field groups designed in the block editor and values displayed through block bindings. Its values are standard WordPress metadata.

= Can I migrate from ACF or Secure Custom Fields? =
Yes, with the ACF Migration (beta) of Modern Fields Pro, from ACF or ACF Pro 6.1 or later, or from Secure Custom Fields. It reads your field groups, shows a plan of what will be imported and what will not, then moves the field groups, their values, options pages, post types and taxonomies. You can keep the original values beside the new ones, or put them back afterwards. Flexible Content and ACF blocks are not imported yet. Back up your site and try the migration on a staging copy first.

= Does Modern Fields work with the Classic Editor? =
Yes. Modern Fields is built for the block editor, and field groups also show in the classic editor through metaboxes, WooCommerce products included.

= How do I display field values on the front end? =
Use the Field Value block in your content or your templates: it binds a field to a core block (Paragraph, Heading, Image or Button). No code required. In PHP, `get_field()` and `the_field()` read the values in your templates and custom blocks.

= Where are the values stored? =
In the standard WordPress tables: post, term and user metadata, and options for dashboard widgets. A value is stored under its field's name, so `get_post_meta()` reads it too.

= Can I limit who can manage field groups? =
Yes. Only the users who administer Modern Fields can create or edit field groups, and each field group chooses the roles that fill it in. Permissions integrate with WordPress roles and capabilities.

== Screenshots ==
1. The field group builder with multiple block types.
2. An options page powered by Modern Fields Pro.
3. The field groups list page
4. The block editor showing contextual field blocks alongside content.

== Changelog ==

= 1.6.0 =

New:

* Reverse Relation field: placed on the posts a Post Reference or Relation (Pro) field points at, it lists the posts pointing here and links or unlinks them from this side. Choosing its source field is enough to make that field bidirectional, and get_field() on its name returns the linked posts
* URL field: a web address, typed, pasted or found by searching the site's content
* Tabs: a field group can organize its fields in tabs with the Tabs block of WordPress 7.1, repeater rows included
* Import: the Import screen shows what a file will create, update, restore, leave unchanged or refuse before anything is written, and overwrites conflicts only when you tick the box
* Sync: the Field groups, Post types and Taxonomies lists show the sync files not on the site yet, with an Import button for each and Import all
* Sync: the modern-fields/sync/json_path filter moves or renames the mf-json folder, and the Settings page shows the folder in use
* Post types: attach existing taxonomies (Categories, Tags, another plugin's) to a post type
* Dashboard widgets: a widget's field group can be opened to other roles than administrators
* Field names: a name can now hold hyphens and uppercase letters, kept as typed, as ACF users write them (team-lead, jobData_descriptionContent). Two names differing only by case count as the same name, since the database does not tell them apart. Existing names are unchanged
* WP-CLI: wp modern-fields import --dry-run lists what an import would do to each item, and why
* WP-CLI: wp modern-fields relations verify checks the reverse links of bidirectional fields, and wp modern-fields relations rebuild repairs them
* Developers: the modern-fields/protected_options filter adds option names no options field may use

Improved:

* Field groups: administrators are now always included in the roles of a field group. The location rule shows the Administrator role checked and locked, every saved group stores it, and groups saved before without it are open to administrators too
* Date and Time fields: a filled date or time can now be emptied with a Clear button, in a repeater too, or put back to the field's default with a Reset button when the field has one. A field's default value can be removed in the field group the same way. An empty time shows a "Set a time" button instead of a time nobody chose
* Time field: it no longer defaults to 12:00, a time nobody chose. A Time field without a default stays empty until filled, and the default can be set or removed in the field group. Check your existing Time fields: those left on 12:00 now have no default, so a post that never saved the field shows no time instead of 12:00
* Performance: options pages (Pro), dashboard widgets and get_field() with "option" read their options in one database query, instead of one query per option not saved yet. A site that never saved the Modern Fields settings no longer runs a query for them on every page
* Admin menu: the Modern Fields menu item shows the plugin's logo instead of a generic icon
* Post Reference field: no Bidirectional toggle to switch on any more. A field keeps track of the posts pointing at each post it selects as soon as a Reverse Relation field names it as its source, set up in one place, the group showing the reverse. A field switched on before keeps working without any Reverse Relation field, for templates reading it with modern_fields_get_linked_posts(), and shows its toggle until switched off
* Field groups: the Templates rule of the Pages location now lists the page templates of a classic theme (a PHP file with a Template Name header), by name, alongside the block templates of a block theme. Before, it only knew block templates, so a classic theme offered none. A template a group targets but the active theme no longer has stays selected and shows under its file name
* Field groups: a field group's fields are now read from the group itself. The hidden copy kept of each field (one mf_field post per field) is deleted once after the update, with nothing to do on your side. Going back to an earlier version afterwards: save each field group again, or its fields do not show nor save. Field values are not touched

Fixed:

* Classic editor, profiles, terms and media: the values of Checkbox, Gallery, Multi Token and Rich Text fields (and of the Repeater and Block Editor fields of Pro) were not saved on these screens, and a repeater sub-field named like a top-level field overwrote that field's value. Every field now saves there as in the block editor
* Field groups: a group restored from the trash comes back as it was, published or draft. It always came back published, so a draft group restored started to apply
* JSON sync: a field group, post type, taxonomy or block deleted for good without going through the trash (WP-CLI, the REST API) kept its file in the sync folder, and the sync offered to import it again
* Field groups: with the Classic Editor plugin, or a plugin or theme turning off the block editor, field groups opened in the classic editor, where their fields and settings did not show. Field groups now always open in the block editor, and the rest of the site keeps its editor
* Import: an item identical to the one in the file is now left unchanged instead of being written again, and importing the same file twice no longer reports every item as a conflict. A conflict is now an item that differs from the file and was changed on this site after the export. The Import screen, the `wp modern-fields import` command and its `--dry-run` show the unchanged items, and `--force` leaves them alone
* Block editor: a role a field group is not open to could not save a post whose values for that group were never saved ("Sorry, you are not allowed to edit the ... custom field"). The values it cannot edit and did not change are now left out of the save
* Field groups: the screens showing fields no longer ask WordPress for the field blocks' default settings, a request refused to users who cannot edit posts (a subscriber filling the fields of their profile). The defaults now come with the field group
* Relation field (Pro): its "Limit items" setting was only applied by the editor's picker, so a list saved through the REST API, code or another screen could hold more posts. Every save now refuses a list over the limit, naming the field. A list stored before the limit was set or lowered, and now over it, is kept: the field says so until you edit it
* Post types and taxonomies: the labels built from the names ("Edit movie", "No movies found") lowercased them, which is wrong in languages that capitalize nouns, such as German. The names are now used as typed
* Range field: emptying its number did not clear the value, and the previous value came back after saving. Emptying it now brings back the field's default
* Email field: an invalid address (no @, no domain) was saved as typed. Every save now refuses it, naming the field, and keeps the value already stored. The field says so under the address while it is invalid. Emptying the field still clears it
* Options pages (Pro): closing the menu item popover of a field group without confirming (Escape, a click outside, its close button) still changed the group, and gave a page placed under another menu a position and an icon, which mean nothing there. Closing it now leaves the group as it was, "Confirm settings" saves only what you changed, and a page under another menu saves neither. A label left empty is no longer saved as "Options": the menu shows the group's title, which the field now suggests
* Accordion block: on WordPress 7.1, every panel of an Accordion placed in a field group stayed open and its headings did nothing, in and out of a repeater. Panels now start open or closed as saved in the field group, open and close on click, honour "Auto-close", and open when the browser's find-in-page matches their content. WordPress 6.9 and 7.0 keep working as before
* Link field: a link picked from the site's content kept pointing at its post or term after it was trashed or deleted, a link to a 404 in templates (modern_fields_get_link(), modern_fields_get_links()) and in bound buttons. It now resolves to no link, as the Post or Archive Link field already did. A typed or external address is kept as before
* Map field: the Google Maps link built by modern_fields_get_map_url() did not encode the place ID, so a character such as & or # in it could add a parameter or cut the link short. Every argument is now encoded. A location whose coordinates are off the globe now gives null, like one with no coordinates
* Date field: in the editor, a date or a date and time showed shifted when the browser's timezone differed from the site's (a date stored on October 27 showed October 26, 14:30 showed 13:30), in a repeater too and for the default value in the field group. The front end was right. The editor now shows the stored date as it is, and picking a day in a date-only field stores that day at midnight instead of keeping the current time
* Field groups: a full width block (columns, group, cover...) spilled 12px out of each side of its box in the classic editor's metaboxes and in dashboard widgets, its fields almost touching the edges. It now stops at the edges of the box
* Field groups list: the Modified column could show the day before or after when the browser's timezone differed from the site's. It now shows the day the site shows
* Field groups: a field whose name holds two hyphens in a row, or starts or ends with a hyphen (as the ACF import keeps them, team--lead for instance), was missing from the forms without a word, its stored value kept but not shown. It now shows and saves like any other field, and says so when its block is not available
* Post Reference, Post Link and Link fields: the posts of a public post type registered outside the REST API (`show_in_rest` off, as is common for post types edited in the classic editor) could not be searched, the post type was missing from the field settings, its archive from the Link field, and the posts already linked showed as "#123, unavailable". They are now searched, offered and named like any other. Drafts and private posts stay limited to the users who may read them
* Relation (Pro) and Post Reference fields: a stored value holding an entry that is no post (a boolean, a negative number, "12abc", a list inside the list), as another plugin, an import or code can leave, showed the field empty with "The value stored for this field no longer fits it", while the Reverse Relation, the relation loop and modern_fields_get_linked_posts() kept its valid posts. Every screen now shows those same posts, each once, in stored order, and the stored value is only rewritten when you edit the field. A value holding no post at all still says so until you edit the field
* Edit screens: a contributor could open the new post screen with the address of another post (post-new.php?post=...) and find in the page the title, the content and the field values of a post they may not read, a private post included. An editor could do the same with a term on a taxonomy's list screen (edit-tags.php?tag_ID=...). The new post screen now always edits the new post, the list screen only holds the form adding a term, and an edit screen gives the values of a post, a term, a user or a media only to a user who may edit it
* Post pickers: searching posts in the Post Reference, Post Link and Link fields, and in the Relation field (Pro), could list other authors' drafts, pending and scheduled posts, with their title and date, to a contributor or an author who may not read them. The search now only finds the posts the user may read. A post linked before and now out of their reach stays in the field, shown by its number
* Field values stored outside the field's screens (core's custom fields box, an import), before a field group declared them, reached the editing screens as stored, markup and all. They now reach them as the field keeps a value when it saves it
* Link, Post Link and Archive Link fields: a link to a private post, a draft or a scheduled post was handed to visitors who may not read it, with its "Private:" title, in templates (modern_fields_get_link(), modern_fields_get_links()) and bound buttons. It now resolves to no link for them, and still to the link for the users who may read it
* Bidirectional fields shown in the REST API: the list of posts pointing at a post, and the Reverse Relation value, included drafts, private, scheduled and trashed posts, for anyone reading the post. They now list the posts the reader may see. The editor still gets every link
* Field Value block: the block editor received the definition of every dashboard widget group, including those open to administrators only. It now receives the groups the user may edit, as for options pages, and of each group only its fields
* User field: its user search let anyone who edits posts list the accounts of any role, subscribers and customers included, and learn each one's role. Without the right to list users, the search now finds the roles the User fields open to them offer, every role when a field names none, and nobody without a User field
* While Modern Fields Pro (or an add-on) was off, the values of its fields could be written by anyone who may edit the post, through the custom fields box, XML-RPC or the REST API, outside the group's roles and unsanitized. Their keys are now closed to writes until the field's block is back, and their values left as they are
* Options pages and dashboard widgets: an options field named after another plugin's setting, one the plugin registers on its admin screens only, read and wrote that plugin's option through the REST API, where the admin screens register nothing. The names other plugins register are now remembered, and such a field stays out of the REST API as it does on the admin screens
* Bidirectional fields: the name of a field written on a post of another type than the ones its group targets (an attachment, through the custom fields box) was mirrored as if the field held it, and the link could not be removed. The mirror now follows a field on its own post types only, attachments for a media group, and the update drops the links left that way
* Field group sync: importing a field group whose identifier was another item's file name (post-type-book, group-…) deleted that item's sync file when the group was saved or trashed. Only the group's own former file is removed now, once its content says it is
* Modern Fields Pro 1.1.0 and older: on Modern Fields 1.4.0 and later, every admin page stopped on a critical error. Such a Pro is now kept from starting, and a notice asks administrators to update it. It starts again on its own once updated
* Field Value block and block bindings: a block bound to a field could name any setting of the site, any user or term data, or the data of another post, private posts included, and show it to whoever saw the post. A bound block now only shows a field registered for what it names: the post shown, or another post the visitor may read and that has no password; an options page field; a field of a term of a public taxonomy; a user field of the visitor, of an author with published posts, or of any user to someone allowed to list users. An image binding only shows an image. Templates calling get_field() read fields as before
* Field Value block and block bindings: a user profile's value shown by a block ran the shortcodes it held once the page was displayed, so anyone allowed to fill in their profile, a subscriber included, could run a shortcode on the site. A user's value now shows its shortcodes as typed text. The values of posts, terms and options pages run theirs, as the content of a post does

= 1.5.3 =

Security:

* Tightened permissions on field groups and on post type and taxonomy definitions: only the users who administer Modern Fields can create, edit, read or delete them
* A field's sanitizing is now always chosen by its field type, never by the content of its field group
* Repeater (Pro): each sub-field's value is now sanitized as the same field is outside a repeater, and a value no sub-field declares is kept as plain text
* Link and Embed fields: an address is now kept only with the http, https, mailto or tel protocol, or as a relative link, in a repeater too

= 1.5.1 =

Improved:

* Pages without fields load lighter: the field styles are no longer printed on every front-end and admin page, only where fields are displayed

Fixed:

* Checkbox, Radio, Select and Button group fields: options without a key or sharing the same key made checking one box toggle several. "Add option" now fills a unique key, and the options list flags a missing or duplicated key
* Spacing field: "Allow custom size" had no effect, the custom size button stayed hidden when filling the field

= 1.5.0 =

New:

* Map field: OpenStreetMap support. With no Google Maps API key set, maps are drawn with OpenStreetMap, which needs no key: the Map field works as soon as the plugin is installed
* Map field: search for an address and click the map to fill it in with OpenStreetMap too, with the address in the language of your admin
* Map field: choose the provider explicitly with the MODERN_FIELDS_MAPS_PROVIDER constant, and point OpenStreetMap to your own tile server or geocoder
* modern_fields_get_map_url() links to openstreetmap.org when the site uses OpenStreetMap

Improved:

* Map field: the settings panel says which provider draws the map, and only offers the settings that provider supports
* Modern Fields admin pages load lighter: the table library behind the Field groups, Post types and Taxonomies screens is loaded once for the whole admin instead of being copied into each screen. That is around 85 KB less to download, and 350 KB less with Modern Fields Pro active
* Every screen that shows your fields (post, product, user, profile, term, media, dashboard) loads around 150 KB less: the field engine is no longer rebuilt into each one
* The block editor loads lighter too: around 50 KB less on a page using the Gallery field, and 70 KB more than that with Modern Fields Pro active

Fixed:

* Groups located on Posts › Terms never showed up, whatever terms the post had
* Groups located on Taxonomies for pages or post types never showed up. They now appear on the entries that have at least one term in one of the chosen taxonomies
* Groups located on Media with "All … types" never showed up. They now appear on every file of that kind: every image, video, audio file, document (PDF, Office, text…) or application file (archives and the like)
* Groups located on Media MP3, M4A, MOV, MKV, TAR, GZIP or 7Z never showed up, because these choices were saved under types WordPress doesn't give those files. Groups saved with them now match, with no need to edit them
* Groups located on Status › Draft now show up on a new post straight away, instead of only after its first save
* Classic editor and WooCommerce products: values typed into a group were lost when the same save stopped the group from applying (publishing a draft with a group located on Status › Draft, or unticking the category a group is located on). Every group the screen showed now saves what you typed in it
* Saving a post type or a taxonomy stripped every backslash from its settings: accented labels came back as "u00c9vu00e9nement", and a double quote in a label or description broke the whole site, with an error on every page. What you type is now saved as is. Labels already damaged need retyping once
* Duplicating or importing a field group stripped the backslashes from its fields' settings: a label such as "Prix & TVA" came back as "Prix u0026 TVA", and the same went for <, >, " and "--"
* A field with a backslash anywhere in its settings (label, placeholder, default value…) was dropped from its group, and its value was no longer saved. Saving the group again brings it back
* Values typed into a field on the classic editor, a WooCommerce product, a user profile, a term or a media file lost their backslashes: `C:\Users` was saved as `C:Users`
* Importing a field group, from the Import screen, WP-CLI or the JSON sync, damaged its fields' settings: every `&` became `&amp;` (`Prix & TVA` showed up as `Prix &amp; TVA`) and anything between < and > was dropped, choice values included. Imports now follow the rule WordPress applies when you save the group in its editor, so an administrator gets the group back exactly as exported. Settings already damaged need retyping once

= 1.4.1 =

Improved:

* Field categories in the inserter follow the order you build a field group in: Input, Selection, Media, Date, Advanced, then Design

Fixed:

* Map field: the address search followed the system colour scheme rather than the admin's, so on a machine set to dark mode the search box and its list of suggestions came up dark and barely readable inside the light admin

= 1.4.0 =

New:

* New Link field: point anywhere (an external URL, or existing content found by searching), using the link picker WordPress uses everywhere else
* Link field: choose whether the field asks for a link text, and whether it offers "Open in new tab"
* New Post or Archive Link field: link to a post or to a post type archive, always chosen from a list rather than typed in
* Post or Archive Link field: restrict the list to the post types, publication statuses and terms of your choice
* Post or Archive Link field: the archive of each post type is offered alongside individual entries, and can be turned off; several destinations can be allowed
* Both link fields display through a Button block, and read in templates with modern_fields_get_link()
* New Embed field: paste a link and preview what it embeds, right under the field
* New User field: pick one or several users, with their avatar in the search results
* User field: restrict the search to the roles of your choice, custom roles included
* New Post Reference field: point to a single post, page or custom post type through a searchable dropdown
* Post Reference field: restrict the search to the post types and the publication statuses of your choice
* Post Reference field: the new Bidirectional option records the reverse relation, so a post can be asked which posts point at it, read with modern_fields_get_linked_posts()
* New Taxonomy field: pick terms with the very interface WordPress uses (a checkbox tree for hierarchical taxonomies, a token field for flat ones)
* Taxonomy field: choose the taxonomy to display, and allow missing terms to be created straight from the field
* New File field: import a file or pick one from the media library
* File field: restrict the media library to a category (images, documents, audio, video, archives) or to specific formats
* File field: set a maximum weight, capped by the server limit and shown next to the field
* New Map field: search for an address, click the map or drag the pin, and the coordinates, the address and its city, postcode and country are all stored
* Map field: the stored value uses the very same keys as ACF's Google Map field, so a template moved over keeps working untouched
* Map field: set the default centre, the zoom, the height, the map type, a light or dark theme, and the colour of the pin
* Map field: the Google Maps API key is read from a wp-config constant or from the modern-fields/maps/api_key filter, never stored in the database
* Map field: without a key, the field still takes coordinates by hand and tells you which line to add where
* Map field: limit the address search to the countries of your choice, or turn the search off entirely
* Read a location in templates with get_field(), and link to it with the new modern_fields_get_map_url()
* New Icon field: pick an icon from the WordPress icon library, or upload one from the media library
* Icon field: the whole Dashicons set is published to the WordPress icon registry, so those icons render through the native Icon block, answer wp_get_icon() and appear in every picker that reads the registry
* Icon field: a plugin registering an icon collection of its own shows up in the picker with nothing to configure
* Icon field: the media library tab can be turned off, leaving only registered icons, the ones the native Icon block can display
* New Gallery field: pick several images at once from the media library, reorder them by dragging the thumbnails, and drop one with the cross that appears over it
* Gallery field: set a minimum and a maximum number of images, and the aspect ratio the thumbnails are cropped to
* Gallery field: the value is the ordered list of attachment IDs, read in templates with get_field()
* Field add-ons have one public entry point: window.modernFields.fields.registerFieldType, with window.modernFields.apiVersion beside it. A third-party field type registers its block and its component in a single call, and inherits the label, description, Required badge and settings panels of the native fields

Improved:

* Theme JSON sync: reading the field group status no longer scans the post type, taxonomy and block files along the way
* Theme JSON sync: a status that fails to load now says so instead of showing an empty column
* Every field's settings moved to the block editor's own settings panels: an option shows at a glance whether it has been changed, resets on its own, and the whole section resets at once
* Editor styles are collected once per stylesheet instead of once per field, so a group of a dozen fields no longer repeats the same CSS a dozen times in the metabox
* Click targets across the plugin are reachable from a keyboard, and what screen readers announce was named properly: the media field's image preview, the checkbox lists, the rich text editor's frame

Fixed:

* Fields storing a structure (Border, Spacing) lost their value when saved from a form rather than the block editor
* Checkbox lists with a capped height squashed their rows instead of scrolling
* Selections were lost when a search narrowed a list of checkboxes
* Role and status pickers now scroll instead of stretching on sites with many roles
* The Link field came up unstyled outside the block editor (on an options page, a term or a user form) because the stylesheet it needs was looked up in the rendered group content, where the marker it looks for no longer exists

= 1.3.0 =

New:

* New Dashboard location: display a field group as a widget on the WordPress dashboard. Values are saved as site options (administrators only)
* Field values are no longer publicly exposed in the REST API. Enable the new 'Expose through API' option per field to opt in
* Image field: choose the display ratio

Fixed:

* Filters and trash have been fixed in list views (Field groups, CPT, Taxonomies and blocks)
* Fixed a fatal error when editing a post whose author no longer exists or was never set (e.g. content created through WP-CLI or the API)
* Fixed a blank options page / dashboard widget when the group contains a checkboxes field that was never saved
* The field groups list now shows "No author" instead of an empty cell for groups without an author

= 1.2.0 =

New:

* Field groups are now available in WooCommerce products & post types with classic editor
* New filters to change the value returned by `get_field()`: `modern-fields/get_field/value` and `modern-fields/get_field/name=field-name`
* Expose render API to prepare for add-ons

Improved:

* Improved RichText field styles in narrow area + color and link dropdowns

Fixed:

* Fixed binding meta to a button in Field value block

= 1.1.0 =

New:

* The whole Modern Fields admin is now a single-page app: switching between Field Groups, Post Types, Taxonomies, Blocks, Import/Export and Settings no longer reloads the page.
* Trash support: move field groups, post types and taxonomies to the trash, restore them, or delete them permanently, with an Active/Trash filter in each list.

Improved:

* Validation notices now appear at the bottom-center of the screen, matching WordPress 7.0.
* Cleaner empty states in the admin lists (column headers are hidden when a list has no items).
* Main menu without icons on small screens (< 1024px) for a tidier layout.

Fixed:

* Fixed regression with field name not being slugified, causing some fields to not be displayed.
* Fixed issues with groups locations not correctly displayed
* Fixed inconsistencies with the Modern Fields admin menu.
* Fixed scroll issues in the Post Types, Taxonomies and Blocks pages.
* Fixed an error shown on a field group with no fields yet.
* Fixed links to Post Types, Taxonomies, Blocks and field groups after the single-page rework.
* Fixed a crash in the location picker when a post or page has no title.
* Fixed saving Settings when a palette color was added without picking a color.

= 1.0.4 =
* Prepare for Modern Fields premium version release
* Fixed an issue with Custom Post Types: private with show_ui=true are now showing in the list
* Fixed issues where Modern Fields was overriding some theme.json defaults
* Some code optimization

= 1.0.3 =
* Fix: native blocks (like Group) no longer lose their color and typography options in the post/page editor when the plugin is active.
* Fixed row selection when clicking the title or toggle in the field groups list (Dataview).
* Fixed image block styles inside field locations.
* Moved the menu below the header for clearer navigation.
* Metabox accordions are now handled natively.

= 1.0.2 =
* New: duplicate field group from the groups list
* New: filter `modern-fields/permissions` to change the minimum role permission to access the plugin
* Added connectors with the Pro version
* Improved some styles for WordPress 7.0
* Improved the date time field according to the chosen format
* Improved the RichText field to avoid issues in the block editor
* Improved group list table (DataViews)
* Improved: specific posts & pages selector now shows draft and pending posts
* Harmonized the filters names
* Fixed meta label in block bindings
* Fixed a crash when saving settings
* Fixed fields label and description encoding
* Fixed default values not showing in some cases

= 1.0.1 =
* New: added import and export via WP CLI
* Fixed an issue with scripts loaded outside the plugin pages
* Fixed image binding in Field value block
* Fixed issue with default CPT icon
* Fixed an issue with display mode option in select field
* Fixed an issue where default field values didn't show up
* Fixed admin menu appearing in options pages when it shouldn't
* Fixed a bug on location selector when invalid location is set

= 1.0.0 =
* Official stable release!
* Removed beta features
* Fixed issue with locations in CPT
* Stability improvements & bug fixes

= 0.9.1 =
* New: JSON sync for Custom Post Types and Taxonomies with the theme

= 0.9.0 =
* New: Register Custom Post Types and Taxonomies from the admin
* New: Navigation menu between Modern Fields sections

= 0.8.0 =
* New: import / export groups in JSON
* New: Sync fields with your theme in /mf-json/ folder

= 0.7.3 =
* Added an onboarding popup when creating your first field group
* Usual roles are pre-selected in location selector
* Fixed duplicate colors in palette field
* Fixed RichText overflow in narrow area like inspector
* Fixed inspector area width
* Fixed image binding with the field value block

= 0.7.2 =
* Fixed vendor prefixing on composer dependencies

= 0.7.1 =
* Fixed an error with user name in fields list
* Fixed a potential conflict with the fields blocks and third party blocks
* Fixed duplicated fields sharing the same unique ID
* Fixed default color palette in Modern Fields settings

= 0.7 =
* New image field option: compact UI
* Fixed color picker when there are custom colors set in appearance
* Fixed missing translations in JavaScript

= 0.6 =
* New fields: checkboxes, radio, select/combobox, multi token and email
* More reliable field data structure

= 0.5.5 =
* Fixed deployment with PHP dependencies

= 0.5.2 =
* Added wp.org assets

= 0.5.1 =
* First deploy

= 0.5.0 =
* Initial beta release.

== Copyright & Trademark ==

"Modern Fields"™ and the Modern Fields logo are trademarks of Dysign.

Copyright © 2024–2026 Dysign. All rights reserved.

The plugin source code is licensed under the GNU General Public License v2 (or later). That license does NOT grant any right to the "Modern Fields" name or logo: they may not be used to identify, brand, or promote derivative or forked products without prior written permission from Dysign.

== Upgrade Notice ==

= 1.6.0 =
Back up your site first. Field groups now read their fields from the group itself: going back to an earlier version means saving each field group again. Time fields no longer default to 12:00. Modern Fields Pro 1.1.0 and older must be updated.
