Repository navigation
1.2.5: Merge pull request #2 from verstka/observe-selector-field-added
🚀 Verstka Backend Update
🆕 New Features
🔹 Configurable Observe Selector
- Added a new admin setting field “Observe Selector” under
Settings → Verstka Backend. - Allows administrators to define custom CSS selectors for the Verstka API to observe on the frontend.
- Default placeholder value:
.banner - The
observe_selectorparameter is conditionally included in the frontend JavaScript only when configured (empty values are gracefully handled).
🔧 Improvements
- Enhanced frontend content rendering with dynamic
observe_selectorconfiguration. - Improved code quality via conditional parameter injection in Verstka API initialization.
🧩 Technical Details
Click to expand
- New admin field:
vms_observe_selector - Location:
Settings → Verstka Backend → Observe Selector - Frontend integration: The configured selector is automatically applied to
api.Article.enable()when rendering Verstka articles. - Backward compatible: If the field is left empty, the
observe_selectorparameter is not included in the API call.
👩💻 For Developers
The new observe_selector option gives developers fine-grained control over which DOM elements the Verstka API observes for content updates — improving performance and flexibility when integrating with diverse WordPress themes and layouts.
Example usage:
.banner, .custom-element
Use multiple selectors to have Verstka observe several dynamic regions on your pages.
Would you like me to add a short version of the release title and summary (for the top of the GitHub release, e.g. “Configurable Observe Selector + API integration improvements”)?