AnimateCss
in package
Builds animate.css subsets from the build-time module manifest for client-side injection.
Not delivered via wp_enqueue_style or wp_add_inline_style: an external animate.min.css blocks first paint (PageSpeed Insights) and WP Rocket / other Remove Unused CSS plugins either strip the link from HTML or inline the full library into Used CSS. The subset is passed through localizeScript and inserted as a <style skip-rucss> tag when the banner script runs — same pattern as the scoped banner stylesheet (RUCSS-compatible, no render-blocking request).
Table of Contents
Constants
- ANIMATION_ALIASES : mixed = ['shake' => 'shakeX', 'lightSpeedIn' => 'lightS...
- Legacy animation names exposed in the UI but split in animate.css v4 source modules.
- STICKY_ANIMATIONS : array<string|int, string> = ['fadeIn', 'fadeInUp', 'fadeOut', 'fadeOutDown']
- Hardcoded in BannerSticky (`fadeIn` / `fadeOut`) and BannerStickyBubble (`fadeInUp` / `fadeOutDown`).
Properties
- $customize : BannerCustomize
- Current banner customize state.
Methods
- __construct() : mixed
- Bind subset resolution to the active banner customize state.
- buildInlineCss() : mixed
- Build minified inline CSS for the animations required on the current page.
- canInlineSubset() : mixed
- Whether all currently required animations are available in the manifest.
- hasConfiguredAnimations() : mixed
- Whether banner or sticky-link animations are enabled in the current customize state.
- collectRequiredAnimationNames() : array<string|int, string>
- Resolve configured banner and sticky-link animation names for the current page.
- getManifest() : array<string, string>
- Build-time manifest keyed by animation name.
Constants
ANIMATION_ALIASES
Legacy animation names exposed in the UI but split in animate.css v4 source modules.
public
mixed
ANIMATION_ALIASES
= ['shake' => 'shakeX', 'lightSpeedIn' => 'lightSpeedInRight', 'lightSpeedOut' => 'lightSpeedOutRight']
STICKY_ANIMATIONS
Hardcoded in BannerSticky (`fadeIn` / `fadeOut`) and BannerStickyBubble (`fadeInUp` / `fadeOutDown`).
public
array<string|int, string>
STICKY_ANIMATIONS
= ['fadeIn', 'fadeInUp', 'fadeOut', 'fadeOutDown']
Properties
$customize
Current banner customize state.
private
BannerCustomize
$customize
Methods
__construct()
Bind subset resolution to the active banner customize state.
public
__construct(BannerCustomize $customize) : mixed
Parameters
- $customize : BannerCustomize
Tags
buildInlineCss()
Build minified inline CSS for the animations required on the current page.
public
buildInlineCss() : mixed
canInlineSubset()
Whether all currently required animations are available in the manifest.
public
canInlineSubset() : mixed
hasConfiguredAnimations()
Whether banner or sticky-link animations are enabled in the current customize state.
public
hasConfiguredAnimations() : mixed
collectRequiredAnimationNames()
Resolve configured banner and sticky-link animation names for the current page.
private
collectRequiredAnimationNames() : array<string|int, string>
Return values
array<string|int, string>getManifest()
Build-time manifest keyed by animation name.
private
getManifest() : array<string, string>
Lines use animationKey:minifiedCss — only the first colon is the delimiter.