跳到内容

HTML Attributes Customizer for Blocks

v1.0.4

NEERAJ K · 2026年5月22日 上架

Add custom HTML attributes to any Gutenberg block: data-*, class, id, aria, fetchpriority. Dynamic {{variables}} on the front end.

正在使用
10 以下
评分
暂无
累计下载
557
最近更新
2026年9月24日
需要 WordPress 6.0+已测试到 7.1.5PHP 7.4+

截图

Attributes tab — HTML attribute lines on a block (one per line: name="value" or boolean names).
Attributes tab — HTML attribute lines on a block (one per line: name="value" or boolean names).
Variables tab — Reference list of variables use inside quoted values.
Variables tab — Reference list of variables use inside quoted values.
Block editor — Image block selected with the HTML attributes panel open in the sidebar (Attributes and Variables tabs).
Block editor — Image block selected with the HTML attributes panel open in the sidebar (Attributes and Variables tabs).

Try in Playground — opens WordPress Playground with this plugin installed and lands on the Add Post editor.

HTML Attributes Customizer for Blocks adds an HTML attributes panel in the block sidebar. Enter one attribute per line as name="value" (double quotes), or a boolean attribute as a single name (for example inert).

Attributes are stored on the block as JSON objects: htmlbacAttributes and htmlbacInnerAttributes (for example {"fetchpriority":"high","data-nolazy":"0"}). Boolean flags use true.

Merging: Duplicate names on multiple lines are combined. Values merge with spaces (semicolons for style). class merges with the block’s existing classes instead of replacing them.

Variables: Use tokens such as {{post.title}} or {{user.auth_status}} inside quoted values. They are replaced when the block renders on the front end.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums