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.

Maintainers

Package info

github.com/PiotrPress/wordpress-asset-block

Language:JavaScript

Type:wordpress-plugin

pkg:composer/piotrpress/asset-block

Statistics

Installs: 80

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.1 2024-11-15 12:23 UTC

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

Asset Block in WordPress block editor view

Requirements

  • PHP >= 7.4 version.
  • WordPress >= 6.0 version.

License

GPL v3 or later