A lightweight Gutenberg block for creating animated news tickers in WordPress.
- Scroll (Marquee) - Continuous horizontal/vertical scrolling
- Fade - Smooth fade in/out transitions
- Slide - Items slide in from any direction
- Typing - Typewriter effect with blinking cursor
- Manual announcements with custom text and links
- Dynamic content from WordPress posts
- Filter by category or tag
- Custom post type support
- 5 color controls (background, text, label, label text, border)
- Spacing controls (padding, margin)
- Border radius, width, style
- Box shadow presets
- Speed, font size, height adjustments
- Play/Pause button
- Previous/Next navigation
- Progress indicator bar
- RTL (Right-to-Left) language support
- Multilingual ready (EN, DE, ES included)
- Responsive design
- No jQuery dependency
- Lightweight (~3KB CSS, ~1KB JS)
- Download the latest release ZIP
- Go to Plugins → Add New → Upload Plugin
- Upload the ZIP file and activate
- Download and extract to
/wp-content/plugins/wm-newsticker/ - Activate through the Plugins menu
- Edit a post or page in Gutenberg
- Add the "Newsticker" block
- Configure settings in the sidebar:
- Choose animation type and direction
- Add announcements or select posts as source
- Customize colors and spacing
- Publish
# Clone the repo
git clone https://github.com/arnoldwender/wm-newsticker.git
cd wm-newsticker
# Install dependencies
npm install
# Build for production
npm run build
# Development with watch
npm run startwm-newsticker/
├── build/ # Compiled JS/CSS
├── languages/ # Translation files (DE, ES)
├── src/
│ ├── index.js # Block editor component
│ ├── frontend.js # Frontend animation script
│ ├── editor.scss # Editor styles
│ └── style.scss # Frontend styles
├── package.json
├── readme.txt # WordPress.org readme
└── wm-newsticker.php # Main plugin file
- WordPress 5.8+
- PHP 7.4+
- Gutenberg editor enabled
This plugin follows WordPress security best practices:
- All output escaped with
esc_html(),esc_attr(),esc_url() - All input sanitized with
sanitize_text_field(),sanitize_key(),absint() - Color values validated with strict regex (hex, rgb/rgba, CSS variables)
- Enum attributes validated with allowlists (
in_arraystrict mode) - Numeric attributes clamped within safe ranges
- REST API endpoints protected with
permission_callback - Post type queries restricted to registered public types only
- Block attributes constrained with JSON Schema (
enum,minimum,maximum) - Singleton pattern hardened against cloning and unserialization
- Frontend JS uses safe DOM APIs only (no
innerHTML) - Editor JS uses
AbortController,addQueryArgs, anddecodeEntities prefers-reduced-motionrespected for all animation types
To report a vulnerability, see SECURITY.md.
- Security: Fixed CSS injection via incomplete regex in color sanitization
- Security: Fixed path traversal in REST API path construction
- Security: Added public post type validation to prevent unauthorized content exposure
- Security: Hardened singleton pattern with
__clone()/__wakeup()protection - Security: Added
defined()guards on plugin constants - Security: Added field allowlist in editor to prevent prototype pollution
- Security: Added
AbortControllerto prevent race conditions on API fetches - Accessibility: ARIA labels now update dynamically on play/pause toggle
- Accessibility:
prefers-reduced-motionnow respected for JS-driven animations - Fix: Hover no longer overrides manual pause state
- Fix: Play/pause icons now update correctly on hover in scroll ticker
- Fix: Timezone consistency using
wp_date()andcurrent_time() - Fix: HTML entities in post titles now decoded correctly in editor preview
- Fix: Editor font size and height ranges now match server-side limits
- Hardening: Added
enumconstraints on all string-enum attributes in block.json - Hardening: Added
minimum/maximumon numeric attributes in block.json - Hardening: Added
items/propertiesschemas on array/object attributes in block.json - Hardening: All dynamic class attributes now use
esc_attr()(WPCS compliance) - Hardening: Support for 4/8-digit hex colors and named colors (transparent, inherit)
- Version bump with dependency updates
- Cleaned up code for WordPress.org submission
- Added spacing and border controls
- Redesigned color picker UI
- Added dynamic content from posts
- Category/tag filtering
- Added user controls (play/pause, prev/next)
- Progress indicator
- Added fade, slide, typing animations
- RTL support
- Initial release
GPL v2 or later - see LICENSE