Elementor Dynamic Tag Fields

Build the body of an Elementor Dynamic Tag — choose Tag (echoes via render(), content_type 'ui') vs Data_Tag (returns a value via get_value(), content_type 'plain'); declare what kind of value it produces via get_categories() using the Module constants (TEXT_CATEGORY, URL_CATEGORY, IMAGE_CATEGORY, MEDIA_CATEGORY, POST_META_CATEGORY, GALLERY_CATEGORY, NUMBER_CATEGORY, COLOR_CATEGORY, DATETIME_CATEGORY, SVG_CATEGORY); add settings fields in register_controls() (NOT the deprecated _register_controls()) with Controls_Manager types (TEXT, NUMBER, SELECT, SELECT2, SWITCHER, MEDIA, …); and wire the fallback system. Important — a Tag gets Before / After / Fallback controls automatically and applies the fallback when render() outputs empty, but a Data_Tag gets NONE of that and must register its own fallback control and consult it in get_value(). Use when implementing or reviewing a dynamic tag's render/get_value, controls, categories, or fallback behaviour.

Lonsdale201 Updated

File contents

Lonsdale201/wp-agent-skills/tree/main/elementor/elementor-dynamic-tag-fields commit 1456a19e2a

Frequently asked questions

npx skillmds@latest add lonsdale201/elementor-dynamic-tag-fields