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.

Installs: 7

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:JavaScript

Type:wordpress-plugin

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

This package is auto-updated.

Last update: 2024-12-15 12:33:02 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