Skip to content

1.2.5: Merge pull request #2 from verstka/observe-selector-field-added

Choose a tag to compare

@tychodaimon tychodaimon released this 10 Nov 16:35
· 2 commits to main since this release
bf9b70c

🚀 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_selector parameter is conditionally included in the frontend JavaScript only when configured (empty values are gracefully handled).

🔧 Improvements

  • Enhanced frontend content rendering with dynamic observe_selector configuration.
  • 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_selector parameter 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”)?