piotrpress / asset-block
This plugin adds an Asset Block for enqueueing registered scripts and styles in content, solving the issue of loading assets with patterns.
Package info
github.com/PiotrPress/wordpress-asset-block
Language:JavaScript
Type:wordpress-plugin
pkg:composer/piotrpress/asset-block
v0.1.1
2024-11-15 12:23 UTC
Requires
- php: >=7.4
This package is auto-updated.
Last update: 2026-02-15 14:54:11 UTC
README
This plugin adds an Asset Block for enqueueing registered scripts and styles in content, solving the issue of loading assets with patterns.
Usage
1. Register script or style
add_action( 'init', function() { wp_register_script( 'example', 'https://example.com/script.js' ); wp_register_style( 'example', 'https://example.com/style.css' );
2. Add Asset Block in editor and select registered script or style
Requirements
- PHP >=
7.4version. - WordPress >=
6.0version.
