Block Attributes
Add additionnals attributes on Gutenberg Blocks.
by @maxpertici · github.com/maxpertici/block-attributes · website
★ 1stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/maxpertici/block-attributes/archive/refs/heads/main.zipReadme
Block Attributes
A WordPress plugin that allows you to add custom HTML attributes to all Gutenberg blocks.
Description
Block Attributes is a WordPress plugin that extends the Gutenberg editor by allowing users to add custom HTML attributes to any block. This functionality is particularly useful for:
- Adding
data-*attributes for custom JavaScript integrations - Setting ARIA accessibility attributes
- Customizing block behavior with standard HTML attributes
Features
- Intuitive User Interface: Integrated inspector panel in the Gutenberg editor
- Security: Attribute validation according to global HTML standards
- *`data-` Attributes Support**: Full support for custom data attributes
- Accessibility: ARIA attributes support
- Flexibility: Works with all Gutenberg block types
Usage
- Edit a page or post in the Gutenberg editor
- Select a block you want to customize
- Open the inspector panel (right sidebar)
- Find the "Attributes" section in the block settings
- Click "Add Attribute" to add a new attribute
- Enter the name and value of the attribute
- Save your content
Security
The plugin validates all attributes according to WordPress global HTML standards. Only allowed attributes are applied to the final markup:
- Standard global HTML attributes
data-*attributes with format validation- Filtering and escaping of all values