SYNQ Animated Backgrounds for Elementor WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA
Install
Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/frankwrk/synq-animated-backgrounds/releases/download/v0.3.4/synq-animated-backgrounds.zipA WordPress plugin that adds animated background controls to Elementor Container widgets.
Current version: 0.3.4
Bundled providers: Vanta Topology and Vanta Trunk
Overview
This plugin adds a Background Animation control section to Elementor Containers and initializes a JS animation provider on the frontend only when needed.
At runtime, the plugin:
- Registers container controls in Elementor.
- Serializes sanitized config into container
data-*attributes. - Loads only required frontend assets (core + used providers).
- Initializes/destroys animation instances with lifecycle-aware JS logic.
- Checks GitHub Releases for plugin updates (outside WordPress.org).
Compatibility Requirements
Plugin header requirements:
- WordPress
>= 6.4 - PHP
>= 7.2 - Elementor
>= 3.24.0 - Tested up to WordPress
6.9.4
If requirements are not met, the plugin does not bootstrap and shows an admin notice with exact compatibility errors.
Compatibility policy details:
- Minimum supported versions are intentionally set a few releases behind current latest stable to reduce avoidable install friction on maintained production sites.
- Elementor prerelease tags (for example
4.0.0-dev4,4.0.0-beta1,4.0.0-rc1) are normalized to their numeric base (4.0.0) before minimum version comparison. This prevents false negatives when a prerelease already satisfies the required base version.
Architecture
Bootstrap
File: synq-animated-backgrounds.php
- Declares plugin metadata and version constants.
- Validates compatibility (WordPress, PHP, Elementor).
- Declares custom
Update URIfor GitHub-based updates. - Shows admin notices when incompatible.
- Loads plugin classes only after requirements pass.
- Loads translations via
load_plugin_textdomain().
GitHub Updater
File: includes/class-github-updater.php
Responsibilities:
- Integrates with WordPress core update checks via
pre_set_site_transient_update_plugins. - Fetches latest GitHub release metadata with transient caching.
- Provides plugin details data for the update modal (
plugins_api). - Supports optional private-repo auth via
synq_ab_github_tokenfilter. - Normalizes GitHub source ZIP extraction paths to the plugin directory and aborts update safely if folder mapping fails.
Core Plugin Orchestrator
File: includes/class-plugin.php
Responsibilities:
- Registers available providers.
- Injects Elementor controls into Container layout tab.
- Detects animation usage from
_elementor_dataand pre-enqueues only required providers. - Adds render-time fallback enqueue for dynamic Elementor contexts.
- Preloads core + provider scripts in Elementor editor/preview so animation and color changes render live before publish.
- Sanitizes and clamps shared config values before writing to HTML.
Provider Contract
File: includes/class-provider-interface.php
Each provider must implement:
get_type()get_label()register_controls($element)normalize_config(array $settings, array $base_config)enqueue_scripts()
Vanta Topology Provider
File: includes/providers/class-provider-vanta-topology.php
Responsibilities:
- Adds provider-specific controls.
- Sanitizes colors (
sanitize_hex_color) and clamps numeric ranges server-side. - Registers/enqueues pinned dependency versions:
three.js r121p5.js 1.1.9vanta.topology 0.5.24
- Exposes a filter for URL overrides:
synq_ab_vanta_topology_script_urls
Vanta Trunk Provider
File: includes/providers/class-provider-vanta-trunk.php
Responsibilities:
- Adds provider-specific controls.
- Sanitizes colors (
sanitize_hex_color) and clamps numeric ranges server-side. - Registers/enqueues pinned dependency versions:
p5.js 1.1.9vanta.trunk 0.5.24
- Exposes a filter for URL overrides:
synq_ab_vanta_trunk_script_urls
Elementor Controls
Section: Background Animation (Container > Layout)
Shared controls:
Enable Background Animation(synq_bg_anim_enable)Animation Type(synq_bg_anim_type)Disable on Mobile(synq_bg_anim_disable_mobile)Intensity (generic)(synq_bg_anim_intensity, clamped0.0to1.0)Speed (generic)(synq_bg_anim_speed, clamped0.5to2.0)
Vanta Topology controls:
Line ColorBackground ColorScale(clamped0.5to2.0)Points (Density)(clamped5to20)Spacing(clamped5to50)
Vanta Trunk controls:
Stroke ColorBackground ColorScale(clamped0.5to2.0)Spacing(clamped0to30)Chaos(clamped0to2)
Frontend Lifecycle
Core runtime
File: assets/js/core.js
Key behaviors:
- Maintains provider registry:
window.SYNQBgAnimProviders. - Adds registration API:
window.SYNQBgAnimRegisterProvider(type, provider). - Re-runs initialization after provider registration via custom event (
synqBgAnimProviderRegistered). - Supports lazy init/destroy using
IntersectionObserver. - Destroys active animations on
document.hidden, re-inits on visibility restore. - Handles Elementor editor rerenders (
frontend/element_ready/containerhooks).
Layering model (stability)
Instead of forcing z-index for every child with a blanket selector, runtime creates an explicit layer:
.synq-bg-anim-layerfor background canvas host..synq-bg-anim-content-layeron non-layer children.
CSS file: assets/css/frontend.css
This isolates animation canvas behavior and avoids brittle global stacking rules.
Provider runtime
File: assets/js/provider-vanta-topology.js
- Uses the registration handshake (
SYNQBgAnimRegisterProvider) when available. - Mounts Vanta to explicit layer (
config.layer) instead of the raw wrapper. - Applies reduced-motion behavior by disabling mouse/touch controls when
motionReducedis set.
File: assets/js/provider-vanta-trunk.js
- Uses the same registration handshake and lifecycle contract.
- Maps Elementor settings to
VANTA.TRUNK(...)options:colorbackgroundColorscalespacingchaos
- Applies reduced-motion behavior by disabling mouse/touch controls when
motionReducedis set.
Asset Loading Strategy
Conditional loading
includes/class-plugin.php performs two-stage loading:
-
Pre-detection stage (
wp_enqueue_scripts):- Parses current post
_elementor_dataJSON. - Finds enabled animation providers.
- Enqueues only required assets.
- Parses current post
-
Render fallback stage (
elementor/frontend/before_render):- Ensures assets still load in dynamic contexts (theme builder/templates) where pre-detection may miss.
This replaces the old “enqueue all providers on all Elementor pages” behavior.
Editor-specific behavior:
- In Elementor edit mode (
elementor/preview/enqueue_scripts,elementor/editor/after_enqueue_scripts), core and all registered provider scripts are preloaded to support immediate in-editor preview when enabling animation or switching provider/colors.
GitHub Release Updates
This plugin can self-update from GitHub Releases (no WordPress.org listing required).
Current default repository:
frankwrk/synq-animated-backgrounds
Optional filters:
synq_ab_github_repository— overrideowner/repo.synq_ab_github_token— set a token for private repos.synq_ab_github_cache_ttl— override release metadata cache TTL (seconds, min 300).
Cache behavior:
- Release metadata is cached using transients for 1 hour by default.
- Manual WordPress update checks with
force-check=1now bypass this plugin cache automatically to fetch the latest GitHub release immediately.
Release recommendations:
- Publish a GitHub Release with a semver tag (for example
v0.3.2). - Prefer uploading a release asset zip named
synq-animated-backgrounds.zipwith plugin files at the zip root. - If only source zipball is present, updater will attempt directory normalization automatically.
Automated release helper:
- Script:
scripts/release.sh - Runs: version bump (
synq-animated-backgrounds.php+README.md) -> commit/tag -> zip build -> push -> GitHub release
Example:
scripts/release.sh 0.3.3
Options:
--notes "text": set release notes text--notes-file path/to/notes.md: read release notes from file--no-push: prepare commit/tag/zip without pushing--no-release: prepare commit/tag/zip without creating GitHub release--allow-non-main: allow running outsidemain
Extension Guide (Adding Providers)
- Add provider class in
includes/providers/implementingSYNQ_Bg_Provider_Interface. - Register provider in
SYNQ_Animated_Backgrounds_Plugin::register_providers(). - Add provider runtime JS in
assets/js/. - Register provider in JS with
window.SYNQBgAnimRegisterProvider('type', providerObject). - Sanitize and clamp all provider settings in
normalize_config(). - Pin dependency versions (avoid floating
@latest). - Validate using
docs/test-matrix.md.
Hardening Changes in v0.2.0
The following improvements were implemented for stability/performance before adding new providers:
- Added WordPress plugin compatibility headers and license metadata.
- Added runtime compatibility checks + admin notices for unsupported environments.
- Switched from global provider enqueueing to conditional per-page/provider loading.
- Pinned external provider dependency versions (removed
@latestusage). - Added provider registration handshake/event so late-loaded providers initialize reliably.
- Added lazy init/destroy (
IntersectionObserver) and page-visibility lifecycle controls. - Added server-side sanitization and numeric clamping for shared/provider configs.
- Replaced blanket stacking approach with explicit animation background layer.
- Added test matrix documentation for regression-safe provider expansion.
Feature Addition in v0.3.0
- Added a second provider:
Vanta – Trunk. - Added provider-specific Elementor controls for Trunk.
- Added Trunk runtime adapter and conditional loading integration.
- Added filterable URL map for Trunk script dependencies.
Compatibility Fix in v0.3.1
- Lowered minimum environment requirements to older supported baselines:
- WordPress:
6.6→6.4 - PHP:
7.4→7.2 - Elementor:
4.0.0→3.24.0
- WordPress:
- Fixed Elementor version checks to treat prerelease builds like
4.0.0-dev4as4.0.0for minimum compatibility gating.
GitHub Update Integration in v0.3.2
- Added WordPress core updater integration for GitHub Releases.
- Added custom plugin metadata
Update URIfor non-WordPress.org updates. - Added safe source-directory normalization during update install to avoid folder mismatch breakage.
- Added optional private-repo auth support via filter.
Updater Cache Refresh Fix in v0.3.4
force-check=1requests from WordPress admin now bypass cached GitHub release metadata to prevent stale update results after publishing a new release.
File Map
synq-animated-backgrounds.php— bootstrap, compatibility checks, notices.includes/class-github-updater.php— GitHub release update integration.includes/class-plugin.php— controls, config serialization, conditional asset loading.includes/class-provider-interface.php— provider contract.includes/providers/class-provider-vanta-topology.php— Vanta provider implementation.includes/providers/class-provider-vanta-trunk.php— Vanta Trunk provider implementation.assets/js/core.js— provider registry + lifecycle runtime.assets/js/provider-vanta-topology.js— Vanta provider JS adapter.assets/js/provider-vanta-trunk.js— Vanta Trunk provider JS adapter.assets/css/frontend.css— explicit layer-based stacking.docs/test-matrix.md— QA scenarios and expected outcomes.
Releases
2 releases. Each count is every asset in that release; expand a row for the breakdown.