=== Dynamic Meta Box Builder ===
Contributors: smarteducationaltools
Tags: meta box, custom fields, custom post types, Gutenberg, REST API
Requires at least: 5.8
Tested up to: 7.1.3
Requires PHP: 8.2
Stable tag: 9.5.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Build custom fields, free post types and taxonomies, and display values visually in FSE templates with the DMBB Field block.

== Description ==

Dynamic Meta Box Builder adds configurable fields to posts, pages and custom post types, or stores one shared set of Public values for your site's header and footer. Configure targeting, required values, validation, conditional visibility, columns and optional tabs. Editors can use media controls and one-level repeaters with row limits, duplication and sorting.

The plugin is maintained by [Emad Zedan](https://emadzedan.com). Visit [Dynamic Meta Box Builder](https://dynamicmetaboxbuilder.com) for product information.

= Free and premium field types =

Five types are free: Text, Textarea, Email, Number and URL.

Thirteen types require premium access: Password, Date, Date & Time, Color, Checkbox, Select, Multi Select, Radio, WYSIWYG Editor, Image, Gallery, Repeater and Hidden. An active premium license or eligible trial enables editing. Existing premium content remains available to theme code when editing is locked. Freemius processes one upload source into the free and premium packages; the seven-day trial requires payment details.

= DMBB Field: visual fields in FSE templates =

Insert the DMBB Field block in the Site Editor, a page or a Query Loop Post Template. Use its Block settings sidebar to select a configured field, the current post or a specific post, an editor preview post, display format, text element, field label, image size and empty-value text. Public fields work without a current post. Preview selection never changes the live template source. The block displays saved values; edit values in matching post editors or Public settings.

The native block is included in Free and Pro. Its five Free field types work in both editions; Pro field choices and previews require active Pro access. Saved supported Pro output remains readable in the premium edition after expiry. Password, Hidden and protected metadata keys are excluded, and unavailable, mismatching, unauthorized or conditionally hidden fields remain hidden. Only deliberately public values should be placed in public templates. Images respect attachment and parent visibility; galleries and repeater displays are limited to 100 items/rows. The developer Custom Block Editor Support metadata APIs remain separate Pro features.

= License renewal and paid features =

If you do not renew an expiring DMGB Pro license, paid feature editing and configuration will be locked after expiry unless you have another active license or an eligible trial. This includes Pro field editing, custom block REST integration, new WooCommerce customer inputs and field writes, and Elementor tag configuration and editor previews. Existing saved values and supported read-only frontend output remain available in the premium edition. Renew and activate the license to restore access; a still-valid lifetime license does not need renewal.

= Custom Post Types & Taxonomies (Free) =

Create and manage site-local custom post types and taxonomies under Meta Box Builder > Custom Post Types & Taxonomies. This feature is included in Free and Pro without a paid license. Each post type can have any number of taxonomies, and a taxonomy can be shared across several managed post types. Lists are paginated; there is no plugin-imposed taxonomy count limit.

Configure stable keys, singular/plural labels, public visibility, hierarchy, archives, URL slugs, REST/Block Editor/FSE support, editor features and post/page editing permissions. Taxonomies support category-style hierarchy or tag-style terms, REST controls and list columns. Existing DMGB post-type and taxonomy-term targeting recognizes the new registrations. DMGB custom block metadata integration and other paid adapters retain their Pro requirements.

Only administrators with manage_options can change definitions. Reserved names, external registrations and conflicting managed URL slugs are rejected; keys cannot be renamed. Non-public managed REST content requires editing permission. Disabling/deleting registrations preserves posts, terms and metadata. Rewrite rules refresh once after changes. Source labels can be translated through existing WPML/Polylang string tools; keys remain stable.

A separate content-types JSON backup uses an atomic add-only restore: identical definitions are retained and conflicting/invalid files are rejected without changes. Export field definitions separately and use WordPress content export or a full site backup for actual content/media. Open Documentation > Custom Post Types & Taxonomies (Free) for both post type structures (Posts/Pages), both taxonomy structures (Categories/Tags), FSE template setup, custom-field Block Bindings (Pro integration), a free Text shortcode example, PHP templates, translation, import order and troubleshooting.

= Shared header and footer values =

Choose Public (Header & Footer) in Category, save the Meta Box, then edit current values on Meta Box Builder > Public (Header & Footer). Public fields need no page selection. Use unique, stable keys across Public boxes and avoid using a shared key for an unrelated post field.

Connect field keys to the PHP templates in your child theme or another theme-maintained customization. For text, a link and an image:

    echo esc_html( dmgb_get_public_value( 'footer_text' ) );
    echo '<a href="' . esc_url( dmgb_get_public_value( 'contact_url' ) ) . '">Contact us</a>';
    echo wp_get_attachment_image( (int) dmgb_get_public_value( 'header_logo' ), 'full' );


The direct Public getter works without a current post, including empty blog indexes, archives, search results and 404 pages. Existing front-end get_post_meta() calls for configured Public keys also read shared values on normal post/page requests. A false or zero post ID is rejected by WordPress before that compatibility filter can run, so shared header/footer code should use dmgb_get_public_value(). The plugin stores values and supplies editing controls; your templates determine where values appear.

Use wp_kses_post() for permitted rich text and loop over Gallery, Multi Select and Repeater arrays, escaping each value for its output context. Public values are stored in the dmgb_public_values option. A configured default initializes missing shared values; it does not overwrite saved values, including an empty value or an unchecked checkbox.

= Storage, permissions and developer API =

Meta Box definitions are stored in the dmgb_boxes option. Managed post type and taxonomy definitions are stored separately in dmgb_content_types. Deleting a definition does not delete its existing post metadata. Import/export transfers definitions, defaults, targeting and layout settings; it does not transfer edited post/Public values or media files.

Builder and import operations require manage_options. Post saves require edit_post and per-key edit_post_meta permission plus valid, post-bound nonces; autosaves and revisions are ignored. Plugin saves sanitize and validate values. Plugin-owned metadata on core WordPress REST endpoints is available only to authorized editors using context=edit; anonymous/view/embed responses omit it. Native REST writes enforce targeting, per-key permissions, sanitization and validation. Invalid DMGB values reject native REST submissions before the post is changed. Use empty values instead of null to clear these fields. Direct PHP integrations remain responsible for their own checks.

Available hooks include dmgb_field_types, dmgb_render_custom_field, dmgb_sanitize_custom_field_value, dmgb_box_target_match, dmgb_normalize_box, dmgb_before_save_box, dmgb_before_update_boxes, dmgb_box_saved, dmgb_box_deleted, dmgb_import_box and dmgb_import_completed. Definition endpoints use /wp-json/dmgb/v1/boxes; the plugin's post-value endpoint uses /wp-json/dmgb/v1/posts/{post_id}/meta. Requests require suitable WordPress authentication and permissions.

Nested repeaters are intentionally unsupported. Password fields mask editing but store ordinary metadata; they do not encrypt values. Repeater defaults and submissions are limited to 20,000 row/subfield cells (rows multiplied by subfields, counting at least one of each). Oversized existing values are preserved, remain available to theme code and are omitted from editable forms until reduced through an authorized update. Post field keys must avoid WordPress control metadata: _wp_, _menu_item_, _edit_lock, _edit_last, _thumbnail_id, _encloseme and _pingme. Existing stored values are not deleted.

= Custom Block Editor Support (Pro) =

Custom Block Editor Support is a Pro integration. An active Pro license or eligible trial is required for DMGB native REST metadata integration and its post-value API, even when a block edits a free field type. The five free types remain available in ordinary Classic/Gutenberg meta-box controls; existing values and PHP rendering remain available after expiry. Open Meta Box Builder > Documentation (How To Use) > Custom Block Editor Support (Pro) for the complete integration guide. It explains how developers can use existing DMGB fields in blocks maintained in their own plugin or theme, with block.json, compiled JavaScript, useEntityProp, PHP registration/rendering, native REST requests, Repeater helpers, Public values and Block Bindings examples.

Post metadata is shared by blocks using the same field key on one post; independent block values belong in block attributes. Compatible native metadata requires authenticated edit context, a matching box, per-key permissions and a REST-enabled post type supporting custom-fields. Repeaters use the separate DMGB endpoint and Public values use dmgb_get_public_value(). The guide covers exact payloads, value types, validation, partial Repeater saves, targeting, licensing, translated values, duplicate editing controls, safe output and troubleshooting.

The companion block example uses WordPress 6.3+; Block Bindings require WordPress 6.5+. The plugin's own minimum remains WordPress 5.8. This documentation update does not generate blocks or change existing field storage and APIs.

= WooCommerce Support (Pro) =

Assign dedicated Meta Box definitions to WooCommerce products, variations, orders, checkout or customer personalization. All WooCommerce integrations require the premium edition; configuration and new field writes require an active license or eligible trial. WooCommerce is optional. This release was tested with WooCommerce 11.2.1 on WordPress 7.1.3 and PHP 8.2.

Product and variation fields use Product Data and inline variation controls, with product-type/category/tag/ID/stock/flag targeting and inheritance for missing variation values. Choose safe public output in the summary, description, a tab or specifications table; use the dmgb_woocommerce_fields shortcode in block themes or dmgb_get_product_value() in your own custom blocks/templates. Password and Hidden values are never automatically published.

Order fields use WC_Order APIs for legacy storage and HPOS. Admin order values are private unless customer/email output is explicitly enabled. Classic Checkout and Checkout Blocks accept Text, Select, Checkbox and supported Date fields through separate adapters using compatible WooCommerce metadata. Native Checkout Block text follows WooCommerce's entity normalization; use WooCommerce field APIs and context-safe display rather than raw text equality between checkout systems. Personalization supports ten customer input types, validates product/variation choices, keeps different choices in separate cart lines, and copies sanitized snapshots to order items and emails. Personalization applies to local simple/variable purchases. Grouped catalog purchases collect no personalization or enforce its required fields; eligible children can be customized on their individual product pages. External product links collect no personalization. Custom Store API clients can submit personalization extension data. These features do not change product prices or order totals.

WooCommerce's product CSV importer/exporter gains validated DMGB columns, JSON array values and explicit missing/skip markers. A separate bulk screen previews changes to one configured field on up to fifty product/variation IDs before applying them. WooCommerce assignment export/import is separate from the ordinary definition export; neither configuration backup contains edited store/customer/order data or media files.

WooCommerce Support and its documentation are Pro features. Open Documentation (How To Use) > WooCommerce Support (Pro) for setup, permissions, all destinations, complete code/CSV/API examples, custom block integration, translation, migration and testing guidance. Dedicated WooCommerce fields use unique dmgb_wc_ keys of up to 191 characters and WooCommerce APIs; they are excluded from the generic DMGB post editor and native WordPress REST metadata. Existing product output and saved cart/order information remain readable after license expiry while new Pro inputs/writes are locked. Product, variation and order saves reject incomplete field groups and preserve their saved values if PHP truncates a large form. Reduce the group or increase max_input_vars before retrying.

= Elementor Pro Support (Pro) =

Version 9.3.4 adds six DMGB dynamic tags for Elementor Pro: Text, Number, URL, Color, Image and Gallery. Select compatible configured post/page, Public Header/Footer or WooCommerce Product/Variation fields, with current/fixed content sources, Theme Builder preview and loop context. Format dates, numbers and translated choice labels without changing stored values; missing-only fallbacks preserve saved blanks and zero.

The integration requires Elementor and Elementor Pro 3.5.0+, the premium DMGB edition and active DMGB Pro access or an eligible trial for editor configuration/previews. DMGB Pro does not unlock Elementor Pro. Saved frontend output remains in the premium edition after DMGB license expiry. Password, Hidden, protected keys, Repeater and private checkout/order/customer sources are excluded. Public visitors receive only allowed public content; authenticated Elementor previews retain object and metadata permissions.

WPML/Polylang post-language resolution, shared text and translated field/choice labels use the existing translation integration. Relevant definition/value changes refresh Elementor generated file caches; external page/CDN caches need their own purge. Open Documentation (How To Use) > Elementor Pro Support (Pro) for twelve sections, nine examples, requirements, safe output, WooCommerce inheritance, migration and troubleshooting. This release adds no repeater widget or Elementor Free-specific widget.

= Interface and content translation =

The plugin interface, field-type names, validation messages, help pages and JavaScript controls use the dynamic-meta-box-builder text domain. The languages/dynamic-meta-box-builder.pot file is a translation template, not a finished language pack. Compile translations to .mo files using a translation editor. WordPress language packs belong in wp-content/languages/plugins/dynamic-meta-box-builder-LOCALE.mo; locally supplied files may use languages/dynamic-meta-box-builder-LOCALE.mo inside this plugin. Choose the appropriate site or user language in WordPress. Keep personal translation files outside the plugin folder to preserve them across updates.

Version 9.2.1 also integrates with an already installed WPML or Polylang. It does not bundle either product or create translations automatically. Without a multilingual plugin, existing editing and storage behavior is unchanged.

For post/page fields, create a translated post through your multilingual plugin. Each language uses that post's own metadata. Use post-type targeting to show a box across languages, or explicitly include translated IDs in rules that target particular posts, parents or taxonomy terms. Targeting and editing permissions still apply.

With WPML, text, textarea and WYSIWYG fields are declared translatable. Repeater translation exposes its text, textarea and WYSIWYG subfields while retaining the surrounding array. Other supported field types use Copy once so editors can change a translated post independently; Password and Hidden fields are ignored. Existing explicit language-configuration declarations take precedence. Check WPML > Settings > Custom Fields Translation after changing definitions, and use WPML's translation workflow for those posts.

With Polylang, creating a translation copies configured post-field values once, except top-level Password and Hidden fields. Edit the text and other locale-specific values in the translated post's normal editor. Later custom-field synchronization excludes DMGB-owned keys to preserve independent language values. This integration does not add Polylang Pro's automatic translation features to the free edition.

For shared Public (Header & Footer) text, open a plugin administration page as an administrator to register the current source strings. Translate them under the Dynamic Meta Box Builder group in Languages > Translations (Polylang), or the same domain in WPML > String Translation (the WPML String Translation module is required). The Public getter returns the current language's translation on the front end, falling back to the source text when none exists. Public settings always edit the original source values. Text, textarea and WYSIWYG values, including these subfields in Public Repeaters, participate; numbers, URLs, email addresses, dates, passwords, hidden values, attachment IDs and stored choice keys remain unchanged. Repeater translations are associated with row positions; review them after reordering or changing rows.

Configured box titles, field labels, descriptions, placeholders, choice labels and Repeater button labels are registered in those string-translation screens too. Post editors display them in the post's language. The builder and Public source editor keep the original configuration. Field keys and choice values remain stable across languages. Translation catalogs and translated posts are maintained by WPML or Polylang and are not included in DMGB definition exports.

== Installation ==

1. Use PHP 8.2 or newer. WordPress 5.8 is the minimum; this release's Tested up to value is 7.1.3.
2. Upload the appropriate release ZIP through Plugins > Add New > Upload Plugin, then install and activate it.
3. For premium editing, activate your Freemius license or eligible trial in the premium edition. Renew an expiring subscription to keep paid editing and integration access unlocked; saved content remains available when editing is locked.
4. Open Meta Box Builder > Meta Boxes, add a box, choose Post / Page or Public, and configure fields and targeting.
5. Save the definition. Edit post/page values in matching editors or shared values on Public (Header & Footer). Connect the field keys to your theme using the in-plugin How To Use examples.
6. For new content structures, use Custom Post Types & Taxonomies to create a free post type and its taxonomies before targeting a Meta Box. Open its documentation for FSE templates and custom-field examples.
7. In a block theme, insert DMBB Field into a Site Editor template and choose the field under Block settings. Set an editor preview post if the template has no post context; use Current post inside a Query Loop Post Template.

== Frequently Asked Questions ==

= How do I update the premium edition? =

Install the released premium update from the WordPress Updates or Plugins page with an active, valid Freemius license. To request a fresh check, open Dashboard > Updates > Check again. PHP must meet the release minimum. Publishing a release does not immediately replace installed files; click Update now or enable automatic updates. Freemius generates a free package during deployment, but free updates require their own distribution channel.

= What happens if I do not renew my Pro license? =

If you do not renew an expiring DMGB Pro license, paid feature editing and configuration will be locked after expiry unless you have another active license or an eligible trial. This includes Pro field editing, custom block REST integration, new WooCommerce customer inputs and field writes, and Elementor tag configuration and editor previews. Existing saved values and supported read-only frontend output remain available in the premium edition. Renew and activate the license to restore access; a still-valid lifetime license does not need renewal.

= Does updating change my existing values? =

Version 9.5.0 retains existing content and adds audited fixes for damaged definitions, complete builder submissions, exact import keys, mixed-target REST schemas, source-value visibility with translated FSE output, external content-type URL conflicts, restricted order lookups and protected media. Interface and documentation edition labels are consistently Free and Pro. Reload open editors after upgrading.

Version 9.4.0 adds the native read-only DMBB Field block, fixes REST targeting, media privacy, order object permissions and malformed translation/import settings, and retains existing definitions and values. Optional Number clearing uses the authenticated Pro DMGB post metadata endpoint because native numeric REST metadata cannot represent an empty string. Native requests that would clear a Number reject before changing the post; native numeric reads represent blanks as zero. Invalid REST field-key aliases are rejected. Empty and 0 post field keys are rejected because WordPress treats them as requests for all metadata; other integer-only keys use the DMGB endpoint and remain hidden from native REST. Public and Repeater child storage are separate. Unavailable taxonomy and post type selections are retained instead of silently broadening targeting.

Version 9.3.6 adds free content type definitions in the separate dmgb_content_types option and bundled documentation screenshots. It does not migrate existing field values or create content or theme templates automatically.

Definitions and values remain in their existing storage. Version 9.3.5 fixes numeric overflow, legacy blank-value fallback, malformed import handling and Elementor date/time formatting, and documents renewal requirements. It retains the official Freemius SDK 2.13.4 and the existing licensing configuration. Version 9.3.4 adds read-only Elementor Pro dynamic tags, a Pro integration guide and Arabic translations without migrating stored fields or values. Keep box IDs and field keys stable when importing definitions used by saved Elementor tags. Version 9.3.3 makes DMGB custom block REST integration and its guide Pro only, and labels WooCommerce Support documentation as Pro. Native metadata editor access and the post-value API require active Pro access, including free field types. The 9.3.2 WooCommerce features and compatibility through WordPress 7.1.3 are retained. Dedicated assignments use a new dmgb_woocommerce settings option and WooCommerce object metadata; existing ordinary definitions and values are retained. The Custom Block Editor Support guide and local View details fallback remain available. Back up and test WooCommerce assignments on staging before enabling them. The translation integration, WordPress jQuery and request fixes from 9.2.1 are retained. Multilingual output does not replace stored source values. Reload open editors after upgrading. REST integrations that read plugin-owned metadata must authenticate and request context=edit. Defaults and explicitly saved empty values keep their normal behavior.

= Why did View details say Upgrade to latest even on the latest version? =

The bundled Freemius SDK uses that generic description when no usable release readme is available for the popup. It can appear on an already-current installation. Version 9.2.2 fills missing Description, Installation, FAQ and Changelog sections from the installed plugin's bundled readme and replaces that placeholder. Full sections supplied by Freemius are preserved, as are its release version, download links and licensing behavior. The fallback describes the installed release; Freemius remains responsible for information about a newer release.

= Why is View details missing while Visit plugin site is shown? =

WordPress needs a plugin slug in its API/update metadata to create the standard popup link. A privately distributed Freemius installation can lack that metadata when already current. Version 9.3.4 supplies a View details link for this plugin when WordPress omits it, opening the standard dialog through the existing Freemius hooks and bundled readme fallback. It avoids duplicate links and follows WordPress plugin-install permissions.

= What does import/export move? =

It moves Meta Box definitions and configured defaults, not edited post/Public values, attachment files or license details. Preview an import before confirming it and choose Replace, Keep or Rename for conflicting definitions. A valid export with no definitions imports successfully without changing existing boxes.

Custom Post Types & Taxonomies has a separate JSON backup for post type and taxonomy definitions. Its restore adds new definitions, retains identical ones and rejects conflicting or invalid files atomically. Restore these structures before field definitions; move posts, terms, media and theme/Site Editor templates using their own WordPress or site backup tools.

= Are custom post types, taxonomies and FSE support free? =

Yes. Both Posts-style and Pages-style post types, both Categories-style and Tags-style taxonomies, and any number of taxonomies per managed post type are included in Free. Standard block-theme templates use the WordPress template hierarchy. The guide includes a companion PHP shortcode example to display a free Text field on a single FSE template. DMGB custom block metadata APIs and Block Bindings integration retain their existing Pro requirement.

= Why do shared values not appear automatically? =

The theme must retrieve and display them. Use dmgb_get_public_value() in shared header/footer templates, including templates with no current post. Enter current content on Public (Header & Footer); changing the builder default does not overwrite saved content.

= Can I use repeaters inside repeaters? =

No. Repeaters support one level, with any supported non-Repeater type as a subfield. Use separate boxes or grouped fields for deeper structures.

== Changelog ==

= 9.5.0 =
* Reject truncated builder forms, malformed saved definitions/imports and case-variant duplicate storage keys before replacing definitions.
* Register native REST schemas for eligible post types used by explicit and visual targeting, retaining per-post permissions and Pro integration gates.
* Validate original Email input instead of accepting malformed addresses silently rewritten by sanitization.
* Compare DMBB Field visibility against source values; translate display values and labels once, including nested Public Repeaters and legacy Public key 0.
* Keep editable post choices available despite many unrelated/structural records; protect external public CPT/taxonomy rewrite bases.
* Enforce attachment password protection and individual order permissions in WooCommerce/Elementor paths; guard damaged translated display, choice, media and inheritance settings.
* Restore hidden conditional checkout values during WooCommerce deferred-draft Store API updates and use the configured translated personalization title.
* Preserve Elementor legacy field aliases and intentional blank values; repair malformed View Details sections while preserving Freemius release/package data.
* Standardize Free/Pro labels, improve RTL spacing, rebuild Arabic catalogs with plural forms, refresh the bundled help screenshots and update integration examples.
* Use exact (Free)/(Pro) field/help badges and rename the submenu to Custom Post Types & Taxonomies.
* Add DMBB Field Block (Free) help before the CPT/taxonomy guide, with section-specific screenshots and source examples; match Custom Block Editor Support screenshots to its block_note tutorial.
* Round the Post Types, Taxonomies and Import / Export tab buttons and add 15px spacing below the content-type introduction and help button.
* Preserve Free, active/expired Pro, eligible trial and lifetime behavior; retain official Freemius SDK 2.13.4 and current update configuration. Requires PHP 8.2+, Tested up to WordPress 7.1.3.

= 9.4.0 =
* Add the native DMBB Field block with visual field/source/post/format selectors, live editor previews, FSE and Query Loop context, shared Public values and safe structured output.
* Keep native field display and CPT/taxonomies in Free; preserve Pro field/developer/WooCommerce/Elementor license gates and saved supported frontend reads after expiry.
* Protect native REST routes and properties from CPT/taxonomy conflicts, including filtered namespaces/bases and external registrations.
* Retain unavailable taxonomy/CPT targeting selections and expose non-public UI taxonomies; prevent disabled taxonomy rules from silently broadening AND targeting.
* Reject REST key aliases and native empty Number writes before post changes; protect legacy integer keys and reject falsey post keys that WordPress treats as an all-metadata request; document safe optional Number clearing through the DMGB endpoint.
* Enforce native per-order capabilities for legacy orders and HPOS; preserve checkout snapshots across nested REST dispatch.
* Bound WooCommerce assignment imports and reject malformed/private media and Elementor overflow/format values without warnings.
* Show import validation errors and successful import counts; guard malformed notice parameters and translate shared Public field previews in the Site Editor.
* Guard damaged multilingual settings, complete Arabic CPT/FSE help, fix narrow-screen Classic Editor field grids and logical RTL spacing/code layout and refresh screenshots, examples and plugin details.
* Move Custom Post Types before How To Use; keep Getting Started first and CPT/Taxonomies before Custom Block Editor Support.
* Retain official Freemius SDK 2.13.4 and its existing product/update configuration. Requires PHP 8.2+, Tested up to WordPress 7.1.3.

= 9.3.6 =
* Add local screenshots to every field reference and feature guide, including CPT/taxonomy setup, FSE templates and custom-field display.
* Add free Custom Post Types & Taxonomies management in its own submenu, with unlimited taxonomies per post type and optional shared assignments.
* Add stable-key validation, registration conflict protection, native permission mapping, non-public REST access checks and retained content on removal.
* Add REST/editor, archive, hierarchy, rewrite and editor-feature settings, plus paginated lists and safe packed form submissions.
* Add separate content-type JSON backup/atomic restore and a free guide with setup, field targeting, templates, PHP examples and translation information.

= 9.3.5 =
* Keep long WooCommerce bulk field selectors within the settings page on narrow LTR and RTL screens.
* Allow valid saved Date & Time seconds/fractions in browser controls instead of blocking form submission with a minute-only step.
* Prevent stale ordinary-editor nonces from writing WooCommerce-assigned fields, preserving adapter ownership and Pro license enforcement.
* Preserve deliberately blank mixed-case fields instead of showing obsolete lowercase metadata aliases.
* Reject non-finite and overflowing Number values in post/Public, REST and WooCommerce validation; keep valid zero and finite scientific notation.
* Reject malformed upload shapes and non-finite JSON definitions without PHP failures; bound import file reads to the documented limit.
* Safely reject malformed Gallery objects and nested attachment lists without PHP warnings; preserve valid attachment list behavior.
* Format valid Elementor date/time values with seconds and fractional seconds; prevent PHP errors for corrupt dates and invalid number formatting.
* Explain subscription renewal, locked paid editing/integrations and retained saved frontend content in plugin details and all three Pro integration guides.

= 9.3.4 =
* Keep Import / Export immediately before the final Freemius Account submenu, and provide a View details popup link when WordPress omits it.
* Pro Elementor dynamic tags for text, numbers, links, colors, images and galleries.
* Compatible field selectors, shared Public fields, current/fixed/template/loop contexts and WooCommerce product/variation values.
* Localized formatting, missing-only fallback, translated labels/shared values and privacy/metadata permission checks.
* Premium-only Elementor Pro Support documentation, Arabic controls and guide translations, and generated file-cache refreshes.
* Fix the WooCommerce product-panel legend variable.

= 9.3.3 =
* Make DMGB Custom Block Editor Support native REST metadata and post-value APIs Pro only, requiring an active license or eligible trial.
* Move the custom block guide into the Pro package and label Custom Block Editor Support and WooCommerce Support documentation as Pro.
* Label all thirteen premium field types with (Pro).
* Add a license eligibility helper for companion code, while retaining ordinary free-field editing and saved PHP output.

= 9.3.2 =
* Pro WooCommerce checkout conditions and required rules, with matching Classic and Block validation.
* Date checkout limits, relative day ranges and comparisons between dates.
* Optional Product/Order list columns and administrator exact-value filters, including HPOS.
* Read-only compatibility diagnostics and four downloadable configuration presets.
* Arabic WooCommerce translations and RTL adjustments; translated product/taxonomy targeting and assignment titles.
* Expanded WooCommerce Support examples for Store API clients, CSV translation, presets and store checks.


= 9.3.1 =
* Add Pro WooCommerce product and variation fields, targeting, parent inheritance and safe storefront display/shortcode/developer reads.
* Add Pro order fields using WooCommerce CRUD for HPOS and legacy storage, with explicit customer and email visibility.
* Add Classic Checkout and native Checkout Block field adapters, plus validated product personalization for standard forms and Store API clients.
* Add preview/apply bulk editing, validated WooCommerce product CSV integration and separate assignment configuration import/export.
* Add the WooCommerce Support documentation page with setup, custom block, PHP, checkout, Store API and CSV examples.
* Protect assigned keys from competing generic editors, enforce permissions/nonces/license eligibility and preserve saved data on expiry.
* Preserve grouped/external purchase behavior, reject incomplete WooCommerce admin field groups and set titles on hidden documentation pages.
* Keep the eighteen existing field types, Freemius SDK/configuration, author details and WordPress/PHP requirements; refresh translations.

= 9.3.0 =
* Set Tested up to to WordPress 7.1.3 for compatibility information in View details.
* Update the release version to 9.3.0 while preserving existing features, field storage and Freemius integration.

= 9.2.2 =
* Add the Custom Block Editor Support documentation page with a complete companion block example and practical native REST, Repeater, Public value and Block Bindings examples.
* Explain field types, permissions, targeting, validation, licensing, translation, save workflows, output escaping and troubleshooting.
* Keep code examples separate from translated prose and render them as escaped, responsive code blocks.
* Restore missing View details sections from the bundled readme when Freemius supplies only its generic upgrade description; preserve remote release data and licensing.
* Update the translation template and translate the Builder help-menu label.
* Retain existing field storage, Freemius configuration and the WordPress/PHP requirements.

= 9.2.1 =
* Use WordPress's registered jQuery and retain its editor, media, color-picker and sortable dependencies.
* Set Tested up to to 7.1 and keep PHP 8.2 as the minimum.
* Reject malformed sort, preview and packed-save JSON without PHP errors or partial changes.
* Safely encode extension field-type labels in JavaScript and report failed sort/preview requests.
* Make the interface, help, validation and dynamic controls translation ready; include a POT template.
* Integrate WPML and Polylang for post-field translation, shared Public text and configured display labels, preserving source storage and stable keys.
* Add responsive outer spacing to plugin settings and help screens.
* Preserve Freemius configuration and the five free plus thirteen premium field types.

= 9.2.0 =
* Restrict native REST metadata reads to authorized editing context and matching fields.
* Apply plugin targeting, sanitization and validation to native REST metadata writes.
* Bind box nonces to the post and restrict generic form saves to matching boxes.
* Respect per-key WordPress metadata permissions and existing registrations across saving and defaults.
* Protect WordPress control/file metadata namespaces from post field definitions and updates.
* Bound Repeater defaults, submissions and rendering to 20,000 row/subfield cells while preserving larger legacy content.
* Preserve backslashes in packed builder payloads, validation patterns and stored post values.
* Validate REST box definition shapes before normalization and return clear errors.
* Update REST, permissions, Repeater-limit and upgrade documentation.
* Render the Public PHP example as one WordPress-compatible code block without broken fences or link conversion.

= 9.1.5 =
* Preserve dependent content when a submitted conditional controller fails validation in classic or custom REST saves.
* Reject malformed Multi Select entries instead of silently clearing saved selections.
* Preserve exact legacy mixed-case box IDs during import and migration, including IDs that differ only by case.
* Validate imported box and field shapes before preview or storage without fatal errors.
* Detect duplicate incoming IDs and report conflict outcomes and counts accurately.
* Accept an empty definition export as a valid import that makes no changes.
* Preserve quoted tab names and build choices without unsafe HTML attributes.
* Restore subfield drag sorting after duplicating a Repeater builder card.
* Refresh conditional visibility after Color picker palette and Clear actions.
* Keep conditional controllers scoped to their own Repeater row after duplication, sorting or removal.
* Preserve exact legacy box identities when editing, cloning, saving, deleting and registering editor controls.
* Render valid theme template choices for posts, pages and custom post types without array-to-string warnings.
* Honor the Repeater row-collapsible setting.
* Restore standard readme metadata, sections, changelog and upgrade notices.
* Replace missing theme-file instructions with inline, escaped Public getter examples.

= 9.0.2 =
* Requires PHP 8.2 or newer.
* Tested with WordPress 7.1.3 on PHP 8.2.12.

= 9.0.1 =
* Updated the plugin author to Emad Zedan, author website to https://emadzedan.com and plugin website to https://dynamicmetaboxbuilder.com.

= 9.0.0 =
* Fixed legacy value preservation, incomplete checkbox submissions, repeated builder saves, targeting Live Test and ALL/ANY logic, tab removal, repeater subfield sorting, REST box IDs and cached import previews.
* Retains the combined Freemius upload source, five free and thirteen premium field types, and the seven-day trial requiring payment details.

= 8.0.0 =
* New release version for Freemius deployment. Retains the combined free/premium source, five free field types and seven-day trial requiring payment details.

= 7.5.5 =
* SDK configuration update: 7-day trial requiring payment details; free-and-paid setup retained.
* One Freemius upload source generates free and paid packages through documented premium-only code scopes.
* Text (Free), Textarea (Free), Email (Free), Number (Free) and URL (Free) remain available. Other types remain visibly locked without premium access.
* Preserves existing saved frontend content while removing paid editing implementations from the generated free package.

= 7.5.4 =
* Text (Free), Textarea (Free), Email (Free), Number (Free) and URL (Free) remain available without a paid license. Other field types require the premium edition and an active Freemius license or eligible trial.
* Premium fields remain visible but locked without access. Existing saved premium content remains available to frontend templates.
* Added explicit multiline sizing and vertical resizing for Textarea controls on Public (Header & Footer) and post/page editors.
* Checked Public Textarea rendering and multiline save/reload behavior.

= 7.5.3 =
* Expanded the Validation & Conditional Logic help guide with every setting, field-specific checks, examples and troubleshooting. The builder links directly to this guide beside Enable conditional visibility.
* Fixed collection comparisons, field scoping, numeric condition consistency, hidden-value clearing and rich-text empty checks.
* Malformed values and invalid regex patterns now produce validation errors; existing saved values are preserved when validation fails.
* Verified all 18 custom field types using isolated PHP save-path tests and headless Chrome controls/layout tests.

= 7.5.2 =
* Default initialization now works across all field types. Save the affected Meta Box again after upgrading to fill eligible empty post/page values. Nonempty values, numeric zero and unchecked checkboxes are preserved.
* Multiselect defaults: comma/newline-separated option values, or a JSON array such as ["0","1"]. Gallery defaults: comma-separated attachment IDs or a JSON ID array.
* Repeater defaults: a JSON array of row objects using subfield keys, for example [{"title":"First row"}]. Missing subfields can use their configured defaults.
* Defaults are sanitized and validated. Invalid defaults are not applied. Public fields retain their missing-values-only initialization policy.

= 7.5.1 =
* Fixed Text defaults remaining empty on targeted posts/pages after saving a Post / Page Meta Box. Missing or empty Text values now receive the configured default; existing nonempty values are preserved.
* After updating, open the affected Meta Box and click Update Meta Box to apply its saved defaults.
* Clearing a field in the post editor keeps it empty until the Meta Box is explicitly saved again.

= 7.5.0 =
* Fixed repeater data loss, supported subfield controls, conditional logic and validation.
* Cleared post fields remain empty, and multiselect options with value 0 are preserved.
* Date, date/time and color formats are validated server-side; gallery REST values use integer attachment IDs.

= 7.2.3 =
* Documented the direct Public getter for shared header/footer values when no current post exists, including empty blogs and archives.
* WordPress rejects false or zero post IDs before metadata filters run. Connect dmgb_get_public_value() to your existing theme templates using the inline examples in Description; a plugin update does not rewrite theme files.

= 7.2.2 =
* Existing front-end get_post_meta( get_the_ID(), 'public_field_key', true ) calls now read shared Public values on post/page requests. This fixes missing shared footer fields on inner pages without editing existing theme calls.
* Only keys in a current Public box are bridged. Shared values override old per-page values for that key without copying or deleting post metadata. Normal fields, admin/API reads and background jobs keep their existing behavior.
* For new code, use dmgb_get_public_value( 'field_key' ); it works without a page ID, including in headers outside the loop and non-post templates. Protected keys starting with an underscore and attachment/revision metadata use this explicit getter when a shared value is needed.

= 7.2.1 =
* Choosing Public hides page/post targeting, context and priority. Switching back to Post / Page shows those controls with their selections preserved.
* Public (Header & Footer) now has a dedicated feature guide under How To Use, with PHP examples and advice for editors.
* Valid Public defaults are stored for missing shared field keys when saving/importing a box. Opening WordPress admin as an administrator also fills missing defaults from existing Public boxes after upgrading.
* Existing shared values, including empty values and unchecked checkboxes, are preserved. Change current content on Public (Header & Footer); changing a builder default does not overwrite saved content.
* Public fields require no page selection. Connect their keys to header/footer PHP templates once, then let editors manage values on the shared settings page. Values appear wherever those templates call dmgb_get_public_value().

= 7.2.0 =
* The main Meta Boxes list controls the order of boxes within each editor area, overriding old saved user ordering and differences in priority.
* Added Public (Header & Footer): choose this Category in Meta Box Details, save the box, then edit shared values under Meta Box Builder > Public (Header & Footer).
* Fixed Group Fields into Tabs activation, deactivation and keyboard controls while retaining field collapse behavior.

= 7.1.4 =
* Removed the Back To Top button from the Meta Box edit screen.
* Saving a Meta Box now writes newly configured default values into existing matching posts (only where the field's meta key is missing), so a newly added field with a Default Value is stored in post meta and available to the front end and REST API without opening and re-saving every post. Existing values, including an intentionally empty value, are never overwritten.
* Version updated to 7.1.4 while retaining the plugin folder name `dynamic-meta-box-builder`.

= 7.1.3 =
* Restored per-field reordering with dedicated Up and Down word buttons in the field header. Unlike the previous arrow buttons, they are labeled with words so they cannot be confused with the collapse/expand arrow.
* The Up and Down buttons move a field one position at a time and work across pager pages: when a field moves onto a different page, the pager follows it so the moved field stays visible.
* Version updated to 7.1.3 while retaining the plugin folder name `dynamic-meta-box-builder`.

= 7.1.2 =
* Fixed the Add Field button. The click handler previously ran in a separate script scope where the builder's addField() routine was not defined, so adding a field did nothing. The handler now runs in the builder scope, appends the new field to the end of the list, and moves the pager to the final page that contains it.
* Version updated to 7.1.2 while retaining the plugin folder name `dynamic-meta-box-builder`.

= 7.1.1 =
* Simplified the builder field header: removed the extra Move Up / Move Down arrow buttons so each field now shows a single collapse/expand button that swaps between the up arrow and the down arrow.
* Version updated to 7.1.1 while retaining the plugin folder name `dynamic-meta-box-builder`.

= 7.1.0 =
* Fixed Meta Box tabs appearing empty on the post editor when the Collapsible Meta Box option is enabled. The collapsible open/closed state now deterministically reveals the active tab panel.
* Replaced all builder drag-and-drop with a lightweight pointer-based sorter for the Meta Box list, builder fields, and tabs. This removes the native HTML5 drag preview and the repeated reflow that caused the WordPress admin page to freeze.
* Added reliable Move Up / Move Down buttons for Meta Box rows, field cards, and tabs as a guaranteed fallback to dragging.
* Restored Meta Box list reordering with AJAX persistence.
* Guarded optional jQuery UI Sortable calls so a missing dependency can no longer abort the plugin admin script.
* Made the Meta Box Builder submenu show only the current items (Meta Boxes, How To Use, Import / Export) by filtering out any legacy or third-party entries.
* Version updated to 7.1.0 while retaining the plugin folder name `dynamic-meta-box-builder`.

= 6.0.0 =
* Restored the complete v5.0.x builder functionality as the baseline for this major release.
* Meta Box names in the main list now link directly to their Edit pages.
* Added client-side field paging so only 10 field cards are attached to the active builder DOM page at a time.
* Preserved every field across pages and included the complete collection in AJAX saves without a max_input_vars dependency.
* Added visible dropdown arrows to select/list controls.
* Collapse/expand now shows an up arrow when expanded and a down arrow when collapsed.
* Field names in the card header are clickable expand/collapse controls.
* The package always uses the stable plugin folder name `dynamic-meta-box-builder`; the version is not included in the folder name.

= 3.0.0 =
* Fixed intermittent frontend retrieval failures caused by lower-casing mixed-case field keys with sanitize_key(). Field meta keys now preserve the exact case entered in the builder while allowing only safe key characters.
* Added case-insensitive duplicate meta-key protection so keys that differ only by letter case cannot collide in WordPress post-meta storage/caching.
* Fixed the v2.9.8 submission-presence implementation so every rendered field has a deterministic empty-value path and no undefined presence variable is referenced.
* Preserved conditional-field behavior while making submitted-empty values deterministic.
* Fixed the dmgb_before_save_box developer hook so filtered box changes are actually persisted.
* Updated Dynamic Meta Box Builder admin JavaScript to use jQuery 4.0.0 in an isolated noConflict instance, with a safe fallback to WordPress jQuery if the official CDN is unavailable.
* Kept WordPress core jQuery available for jQuery UI Sortable, media, and color-picker integrations, avoiding a global replacement that could break WordPress admin components.
* Added compatibility handling for jQuery 4 removed $.trim() and $.isArray() APIs.
* Retained vertical tab sorting and inline tab-name editing.
* Hardened field-key normalization and REST field-key handling.
* Production QA included PHP syntax validation, JavaScript compatibility review, ZIP integrity verification, and targeted review of post-meta save/retrieval, tabs, repeaters, media, validation, targeting, REST, import/export and developer-hook paths.

= 2.9.0 =
* Update Meta Box now saves changes and keeps the administrator on the current builder screen.
* Saved boxes are reopened in edit mode after saving, so additional changes can be made without returning to the Meta Boxes list.
* The Meta Boxes list remains available through the existing navigation when the administrator intentionally chooses to leave the builder.

= 2.8.5 =
* Sticky Update/Create Meta Box action while scrolling the builder.
* Improved visibility of the primary save action on long builder pages.

= 2.8.4 =
* Fixed multi-tab editor grouping.
* Added a Tab / Field Group field control so each distinct group name creates its own editor tab.
* Added group-name suggestions for consistent tab naming.

= 2.8.3 =
* Improved multi-select targeting controls so selected items can be removed with a normal click.
* Clicking an unselected item adds it without requiring Ctrl/Cmd.
* Existing target values and saved configurations remain backward compatible.

= 2.8.2 =
* Fixed the WordPress admin top-level menu icon when viewing non-plugin admin screens.
* Added a dedicated 32px PNG menu icon asset so the full-size branding logo is never rendered in the WordPress menu.
* Added menu-icon CSS through admin_head on every admin screen, keeping the icon constrained even when the plugin page is not selected.
* Preserved the 512px PNG branding logo for the plugin's internal headers.

= 2.8.1 =
* Fixed the Add Field and Add Another Field controls in the visual builder.
* Added a delegated click handler so the controls continue working with dynamically managed builder markup.
* Added an independent fallback handler so field creation remains available even if another optional builder JavaScript feature encounters an error.
* Cleaned the reusable field template so source-code documentation comments cannot interfere with template parsing.
* No changes to saved box definitions, post metadata, targeting rules, validation, REST APIs, templates, presets, or existing field data.

= 2.7.2 =
* Expanded the How To Use hub with dedicated guides for Getting Started, Builder, Validation & Conditions, Targeting Rules, Tabs & Repeaters, Templates & Presets, Import & Export, REST & Developer, and Diagnostics.
* Retained all existing field-specific and targeting help pages.
* Added clearer explanations of v2.7 visual targeting rules, backward compatibility, REST endpoints, reusable architecture, repeater limits, validation behavior, and import safety.
* Added explanatory inline comments throughout the PHP, HTML, CSS, and JavaScript implementation.
* Comments document the purpose of each executable/source line without changing plugin behavior.
* No database schema or existing post-meta storage changes.

= 2.7.0 =
* Added an optional visual targeting rule engine with grouped ALL/ANY logic.
* Added live targeting preview for unsaved rules.
* Added reusable targeting presets.
* Added editor-level "Why am I seeing this Meta Box?" diagnostics.
* Existing v2.0-v2.6 targeting remains unchanged unless the new engine is enabled.

= 2.6.0 =
* Full Box Templates let administrators save complete Meta Box definitions and reuse them safely as new starting points.
* The builder can clone fields from an existing Meta Box without copying its targeting rules or identity.
* Large post/page/hierarchical target lists automatically switch to AJAX search pickers to reduce admin-page payloads on bigger sites.
* Parent and ancestor target searches are limited to hierarchical post types.
* Authenticated REST endpoints expose actual configured post-meta values for compatible matching boxes: `/wp-json/dmgb/v1/posts/{post_id}/meta`.
* REST post-meta writes use the same sanitization, validation and conditional-visibility rules as normal editor saves.
* Existing v2.5 APIs, storage, metadata and configuration formats remain backward compatible.

= 2.5.0 =
* Field Groups can optionally become editor tabs without changing existing field definitions.
* Repeaters now support minimum/maximum rows, custom row labels, collapsible rows, row duplication, sorting and a safe empty-row template.
* Repeater row validation is enforced server-side, including required subfields and nested validation rules.
* Simple array meta fields are registered with REST using explicit schemas; repeaters remain server-managed to avoid unsafe generic REST schemas.
* Existing v2.4 definition REST endpoints remain available.
* Gutenberg/Block Editor compatibility is improved through WordPress registered post meta for supported field types.
* Target Diagnostics now shows per-rule match/fail details and AND/OR context.
* Existing v2.1-v2.4 configurations are normalized for backward compatibility.

== Upgrade Notice ==

= 9.3.6 =
Adds free custom post types and unlimited assigned taxonomies, with hierarchical/non-hierarchical choices, separate safe definition backups, and FSE/template documentation. Existing fields and Freemius configuration are retained. PHP 8.2+ is required; no existing content migration.

= 9.3.4 =
Adds DMGB Pro integration with Elementor Pro dynamic tags and complete examples. Keep field keys and box IDs stable when moving templates. Elementor Pro is a separate dependency; existing storage and Freemius configuration are retained.

= 9.3.3 =
Custom Block Editor Support REST integration now requires active Pro access, including integrations using free field types. Its guide and WooCommerce Support guide are labeled Pro. Ordinary free meta-box editing and stored values remain available; review existing REST clients and reload open editors.

= 9.3.2 =
Adds Pro WooCommerce checkout rules, date limits, admin columns/filters, diagnostics, presets and Arabic translations. Hidden checkout values are excluded from new orders while existing customer values are preserved. Review new assignments before enabling them and reload open editors. Requires PHP 8.2 or newer.

= 9.3.1 =
Adds optional Pro WooCommerce integrations and documentation. Back up your store, test new assignments on staging, and reload open editors. Existing ordinary field storage remains unchanged. Requires PHP 8.2 or newer.

= 9.3.0 =
Updates the release version and declares compatibility through WordPress 7.1.3. Requires PHP 8.2+. Existing fields, values and Freemius updates retain their behavior. No database migration.

= 9.2.2 =
Adds Custom Block Editor Support examples and restores missing View details Description, Installation, FAQ and Changelog sections. Existing field storage, APIs and Freemius updates are retained. Requires PHP 8.2+. No database migration.

= 9.2.1 =
Adds WPML/Polylang integration, translation-ready controls, WordPress jQuery, request fixes and responsive settings margins. Requires PHP 8.2+. Existing values keep their storage; no database migration. Reload editors and register Public strings from an administrator page.

= 9.2.0 =
Security update for REST privacy, metadata permissions and post-bound nonces. Native REST reads require authorized context=edit. Reload open editors after upgrading. Oversized Repeater data is preserved. PHP 8.2 or newer is required; no database migration.

= 9.1.5 =
Fixes conditional data loss, malformed selections/imports, import ID/conflict handling, quoted tabs, repeater controls, color conditions and release documentation. PHP 8.2 or newer is required. No database migration is needed.

= 9.0.2 =
Requires PHP 8.2 or newer. Tested up to WordPress 7.1.3.
