=== PressUndo Repeater for Elementor ===
Contributors: pressundo
Tags: elementor, acf, repeater, dynamic content, custom fields
Requires at least: 6.4
Tested up to: 7.1
Stable tag: 1.1.4
Requires PHP: 8.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Display ACF/SCF repeaters in Elementor with secure placeholders, multiple sources, nested rows, templates, conditions, and carousel support.

== Description ==

PressUndo Repeater for Elementor displays repeater-field data inside Elementor with a modern, security-focused rendering engine.

It is suitable for new projects and for sites migrating from the former **ACF Repeater for Elementor** plugin. PressUndo keeps useful legacy conventions while adding multiple independent repeaters, richer ACF/SCF field support, nested repeaters, several data sources, saved Elementor templates, conditional visibility, safer output handling, and optional Elementor Pro Loop Carousel integration.

PressUndo is an independent plugin and is not affiliated with or endorsed by Elementor, Advanced Custom Fields, Secure Custom Fields, or the original plugin authors.

= Main features =

* Dedicated **PressUndo Repeater** Elementor widget.
* Repeat existing containers, sections, columns, and supported widgets from **Advanced > PressUndo Repeater**.
* Multiple independent repeaters on the same page.
* Modern `{{ field_name }}` placeholders plus legacy `#field_name` support.
* Complex properties such as `{{ image.url }}`, `{{ taxonomy.name }}`, `{{ taxonomy.url }}`, `{{ post.title }}`, and `{{ post.url }}`.
* Common image, file, link, taxonomy, post object, relationship, user, select, checkbox, radio, color, array, and scalar values.
* Data sources: current post, ACF/SCF Options Page, current term, current user, custom post ID, and parent repeater row.
* Nested repeaters.
* Saved Elementor template rendering per row.
* Classic Accordion/Toggle and Nested Accordion support.
* Optional Elementor Pro Loop Carousel integration.
* ACF/SCF hide conditions with AND/OR logic.
* Repeater-field dynamic tag.
* Available-field helper and copyable placeholders in the Elementor editor.
* Context-aware escaping and sanitization for HTML, attributes, URLs, `srcset`, and inline styles.
* No telemetry and no external API calls.

= Quick start =

**Using the PressUndo Repeater widget**

1. Add **PressUndo Repeater** in Elementor.
2. Select your repeater field and data source.
3. Choose Inline HTML or a saved Elementor template.
4. Insert placeholders for repeater sub fields.

Example:

`<h3>{{ name }}</h3>`

`<p>{{ description }}</p>`

`<img src="{{ photo.url }}" alt="{{ photo.alt }}">`

**Repeating an existing Elementor element**

Select a container, section, column, or supported widget, open **Advanced > PressUndo Repeater**, select the repeater field, and use placeholders inside the Elementor content.

= Placeholder syntax =

Recommended syntax:

`{{ field_name }}`

Useful examples:

`{{ image.url }}`

`{{ image.alt }}`

`{{ category.name }}`

`{{ category.url }}`

`{{ related_post.title }}`

`{{ related_post.url }}`

`{{ user.display_name }}`

Row metadata:

* `{{ __index }}` - zero-based index.
* `{{ __number }}` - row number starting at 1.
* `{{ __count }}` - total rows.

Legacy `#field_name` placeholders remain supported for migration.

= Nested repeaters =

A child Elementor element can use **Parent repeater row** as its source, or an inline template can use block syntax:

`{{# employees }}`

`<strong>{{ name }}</strong> - {{ role }}`

`{{/ employees }}`

= Data sources =

PressUndo can read repeater data from:

* Current post.
* ACF/SCF Options Page.
* Current queried term.
* Current logged-in user.
* Custom post ID.
* Parent repeater row.

= Conditional visibility =

PressUndo adds **PressUndo ACF Conditions** to supported Elementor elements. Conditions can use AND or OR logic with empty, not empty, equals, not equals, contains, does not contain, greater than, less than, greater than or equal, and less than or equal comparisons.

= Migrating from ACF Repeater for Elementor =

PressUndo includes compatibility features to make migration easier.

1. Back up the site and test on staging.
2. Deactivate the former ACF Repeater for Elementor plugin before enabling PressUndo on the same production layout.
3. Existing Elementor layouts using a class such as `repeater_FIELD_NAME` are recognized by PressUndo.
4. Existing `#field_name` placeholders remain supported.
5. For new layouts, prefer the PressUndo controls and `{{ field_name }}` syntax.
6. Review complex accordions, carousels, nested repeaters, and saved templates before publishing.

Legacy compatibility helps with migration, but custom code or undocumented behavior from the former plugin may still require adjustment.

= Security and privacy =

PressUndo does not insert repeater values blindly into generated Elementor markup. Values are normalized and escaped according to their output context. Inline HTML row templates are sanitized with WordPress KSES, URL-bearing attributes are filtered, and unsafe inline event attributes are removed.

The plugin does not intentionally send site content, repeater values, or personal data to an external service and does not include telemetry.

== Requirements ==

* WordPress 6.4 or later.
* PHP 8.0 or later.
* Elementor.
* ACF PRO, Secure Custom Fields, or another compatible implementation providing repeater fields and the ACF-style field API.
* Elementor Pro only for the optional PressUndo Repeater Loop Carousel widget.

== Installation ==

1. Install and activate PressUndo Repeater for Elementor.
2. Make sure Elementor and a compatible repeater-field implementation are active.
3. Create a repeater field and sub fields in ACF/SCF.
4. Add repeater rows to the selected data source.
5. Edit the layout with Elementor.
6. Add the **PressUndo Repeater** widget, or configure an existing element from **Advanced > PressUndo Repeater**.
7. Select the repeater field and data source.
8. Add placeholders such as `{{ name }}`, `{{ image.url }}`, or `{{ category.name }}`.
9. Test the editor and frontend before publishing.

== Frequently Asked Questions ==

= Is this the same plugin as ACF Repeater for Elementor? =

No. PressUndo Repeater for Elementor is an independently maintained GPL plugin based in part on the former project. It has its own code changes, features, security hardening, and maintenance path. Original attribution is preserved.

= Can I migrate an existing page from the former plugin? =

Often, yes. PressUndo recognizes the legacy `repeater_FIELD_NAME` CSS class convention and `#field_name` placeholders. Deactivate the former plugin first and test the migrated layout on staging.

= Can I use more than one repeater on the same page? =

Yes. Each repeater uses an isolated rendering context so separate repeaters can use different fields and sources.

= How do I output an image? =

Use properties such as `{{ image.url }}`, `{{ image.alt }}`, `{{ image.title }}`, and `{{ image.id }}` when available in the selected return format.

= How do I output taxonomy data? =

For taxonomy fields returning term objects, use values such as `{{ category.name }}`, `{{ category.slug }}`, `{{ category.id }}`, and `{{ category.url }}`.

= How do I output a Post Object or Relationship field? =

Use properties such as `{{ related_post.title }}`, `{{ related_post.url }}`, and `{{ related_post.id }}`. Multiple relationship values are normalized safely.

= Can I use an Options Page repeater or another post? =

Yes. Select **ACF/SCF Options Page** or **Custom post ID** as the data source.

= Can I use nested repeaters? =

Yes. Use **Parent repeater row** on a child Elementor element or `{{# nested_field }} ... {{/ nested_field }}` in an inline template.

= Can I use a saved Elementor template for each row? =

Yes. Choose a saved Elementor template as the row source and use the PressUndo Repeater Field dynamic tag inside it.

= Does the plugin require Elementor Pro? =

No. Elementor Pro is required only for the optional PressUndo Repeater Loop Carousel integration and any Elementor Pro features used by your own templates.

= Does it create repeatable Elementor Form inputs? =

No. PressUndo displays custom-field repeater data and intentionally leaves Elementor Form submission handling untouched.

== Changelog ==

= 1.1.4 =
* First stable WordPress.org release under the PressUndo identity.
* Rebuilt rendering for multiple independent repeaters.
* Added the PressUndo Repeater widget and Advanced-panel integration.
* Added modern placeholders and legacy migration compatibility.
* Added complex ACF/SCF field normalization and multiple data sources.
* Added nested repeaters, saved Elementor templates, accordions, conditions, dynamic tags, and optional Loop Carousel integration.
* Hardened output escaping and sanitization.
* Added PHP 8.x and Elementor initialization fixes.
* Stabilized the Elementor settings panel and saved-template workflow.

Full development history is included in `changelog.txt`.

== Upgrade Notice ==

= 1.1.4 =
First stable PressUndo release. Sites migrating from ACF Repeater for Elementor should deactivate the former plugin and validate existing layouts on staging before production use.

== Credits ==

PressUndo Repeater for Elementor is a GPL-compatible fork derived in part from **ACF Repeater for Elementor** by Sympl. Original authors retain copyright in their original work. New code, security hardening, refactoring, features, naming, and ongoing maintenance are by PressUndo.
