How nikodemjankiewicz/wpfse-popup-modal works
WP FSE Popup Modal is a WordPress Gutenberg/FSE block plugin. Editors configure a modal ID and content, then place an independent same-page link targeting that ID; on the frontend, the view script intercepts the link and opens the matching dialog, with accessible close and focus handling. PHP renders inner blocks server-side for dynamic content. The graph covers the principal editor, rendering, and browser workflows plus styling and WordPress registration. Relationships for styling and block metadata are documented or indexed; source excerpts do not show their runtime wiring in full.
Main entry points: index.js Block registration · edit.js Modal editor · plugin.php Server block renderer · view.js Dialog interaction
Components 16
Block editor
- Modal editor
src/edit.js - Block registration
src/index.js - Block metadata
src/block.json - Editor styling
src/editor.scss
Block rendering
- Block save markup
src/save.js - Server block renderer
plugin.php - Dynamic inner blocks
- Rendered page
Frontend behavior
- Frontend styling
src/style.scss - Same-page link
- Dialog interaction
src/view.js - Native dialog
- Modal media
WordPress plugin
- PHP block registration
plugin.php
Other components
- Site editor user
- Site visitor
Connections 19
- Site editor user → Modal editor: configures
README.md - Modal editor → Block registration: registers via
src/index.js - Block registration → Block metadata: uses metadata
src/index.js - Block registration → Block save markup: sets save
src/index.js - Block registration → Modal editor: sets editor
src/index.js - Block registration → Editor styling: loads
src/index.js - Block registration → Frontend styling: loads
src/index.js - Modal editor → Block save markup: stores attributes
- Block save markup → Rendered page: saves markup
src/save.js - PHP block registration → Server block renderer: registers callback
plugin.php - Server block renderer → Dynamic inner blocks: renders blocks
plugin.php - Server block renderer → Rendered page: emits dialog
plugin.php - Dynamic inner blocks → Server block renderer: returns markup
plugin.php - Site visitor → Same-page link: clicks
README.md - Same-page link → Dialog interaction: intercepted by
README.md - Dialog interaction → Native dialog: opens or closes
src/view.js - Dialog interaction → Modal media: stops playback
src/view.js - Native dialog → Dialog interaction: restores focus
src/view.js - Rendered page → Native dialog: contains dialog