{"id":117155,"date":"2020-02-10T23:18:13","date_gmt":"2020-02-10T23:18:13","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/block-data-attribute\/"},"modified":"2022-11-07T20:05:57","modified_gmt":"2022-11-07T20:05:57","slug":"block-data-attribute","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/block-data-attribute\/","author":14490511,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.0.2","stable_tag":"trunk","tested":"6.1.10","requires":"5.5","requires_php":"7.4","requires_plugins":"","header_name":"Block Data Attribute","header_author":"MyPreview","header_description":"This plugin designed with extensibility in mind for data that should be associated with a particular block type but need not have any defined meaning.","assets_banners_color":"272822","last_updated":"2022-11-07 20:05:57","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.buymeacoffee.com\/mahdiyazdani","header_plugin_uri":"https:\/\/www.mypreview.one","header_author_uri":"https:\/\/www.mahdiyazdani.com","rating":5,"author_block_rating":0,"active_installs":300,"downloads":5996,"num_ratings":4,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"mahdiyazdani","date":"2020-02-10 23:18:54"},"1.0.1":{"tag":"1.0.1","author":"mahdiyazdani","date":"2020-02-12 16:26:59"},"1.0.2":{"tag":"1.0.2","author":"mahdiyazdani","date":"2020-04-24 23:38:33"},"1.0.3":{"tag":"1.0.3","author":"mahdiyazdani","date":"2020-05-05 17:47:08"},"1.0.4":{"tag":"1.0.4","author":"mahdiyazdani","date":"2020-08-14 11:53:06"},"1.0.5":{"tag":"1.0.5","author":"mahdiyazdani","date":"2020-08-18 19:23:49"},"2.0.0":{"tag":"2.0.0","author":"mahdiyazdani","date":"2022-08-18 19:15:48"},"2.0.1":{"tag":"2.0.1","author":"mahdiyazdani","date":"2022-08-18 19:56:24"}},"upgrade_notice":{"2.0.0":"<ul>\n<li>Due to necessary and unavoidable underlying code refactoring, upgrading to this version from previous releases would require manual data migration.<\/li>\n<\/ul>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":4},"assets_icons":{"icon-128x128.jpg":{"filename":"icon-128x128.jpg","revision":2242125,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.jpg":{"filename":"icon-256x256.jpg","revision":2242125,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.jpg":{"filename":"banner-1544x500.jpg","revision":2243297,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":2243297,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.0.1","1.0.2","1.0.3","1.0.4","1.0.5","2.0.0","2.0.1"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":2772255,"resolution":"1","location":"assets","locale":""}},"screenshots":{"1":"Plugin Settings"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[27762,148857,4121,148076,152129],"plugin_category":[],"plugin_contributors":[129056,127215,151891],"plugin_business_model":[],"class_list":["post-117155","plugin","type-plugin","status-publish","hentry","plugin_tags-attribute","plugin_tags-block-editor","plugin_tags-blocks","plugin_tags-gutenberg","plugin_tags-gutenberg-blocks","plugin_contributors-gookaani","plugin_contributors-mahdiyazdani","plugin_contributors-mypreview","plugin_committers-mahdiyazdani"],"banners":{"banner":"https:\/\/ps.w.org\/block-data-attribute\/assets\/banner-772x250.jpg?rev=2243297","banner_2x":"https:\/\/ps.w.org\/block-data-attribute\/assets\/banner-1544x500.jpg?rev=2243297","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/block-data-attribute\/assets\/icon-128x128.jpg?rev=2242125","icon_2x":"https:\/\/ps.w.org\/block-data-attribute\/assets\/icon-256x256.jpg?rev=2242125","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/block-data-attribute\/assets\/screenshot-1.png?rev=2772255","caption":"Plugin Settings"}],"raw_content":"<!--section=description-->\n<p>This plugin designed with extensibility in mind for data that should be associated with a particular block type but need not have any defined meaning. <code>data-*<\/code> attributes will allow you to store extra information on different Gutenberg blocks, without other hacks such as non-standard attributes, appending properties on DOM, or modifying a block as HTML which will throw a block validation error when opening the post edit page once again.<\/p>\n\n<!--section=installation-->\n<h4>Minimum Requirements<\/h4>\n\n<ul>\n<li>PHP version 7.4 or greater.<\/li>\n<li>MySQL version 5.6 or greater or MariaDB version 10.0 or greater.<\/li>\n<li>WordPress version 5.5 or greater.<\/li>\n<\/ul>\n\n<h4>Automatic installation<\/h4>\n\n<p>Automatic installation is the easiest option \u2014 WordPress will handle the file transfer, and you won\u2019t need to leave your web browser. To do an automatic install of the plugin, log in to your WordPress dashboard, navigate to the Plugins menu, and click \u201cAdd New.\u201d<\/p>\n\n<p>In the search field type \u201cBlock Data Attribute\u201d, then click \u201cSearch Plugins.\u201d Once you\u2019ve found the plugin, you can view details about it such as the point release, rating, and description. Click \u201cInstall Now,\u201d and WordPress will take it from there.<\/p>\n\n<h4>Manual installation<\/h4>\n\n<p>The manual installation method requires downloading the plugin and uploading it to your webserver via your favorite FTP application. The WordPress codex contains <a href=\"https:\/\/wordpress.org\/support\/article\/managing-plugins\/#manual-plugin-installation\" title=\"Manual plugin installation\">instructions on how to do this here<\/a>.<\/p>\n\n<h4>Updating<\/h4>\n\n<p>Automatic updates should work smoothly, but we still recommend you back up your site.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id='how%20do%20i%20create%20a%20custom%20data%20attribute%3F'><h3>How do I create a custom data attribute?<\/h3><\/dt>\n<dd><ol>\n<li>Log into your WordPress website and navigate to Dashboard.<\/li>\n<li>Create a new page, by visiting \u201cPages\u201d \u00bb \u201cAdd New\u201d.<\/li>\n<li>Click on the \u201cAdd Block\u201d button and select the \u201cButton\u201d block. Alternatively, you can start typing <code>\/button<\/code> in a new paragraph block, then press enter.<\/li>\n<li>Once you\u2019ve inserted the block, you can use the block settings sidebar to add your custom data attribute.<\/li>\n<li>Clicking on the <code>\u2699<\/code> cog icon next to the publish button will toggle the visibility of this sidebar.<\/li>\n<li>In the block sidebar, you can expand the <code>Block Data Attribute<\/code> section to add custom attributes as needed.<\/li>\n<li>Publish the page.<\/li>\n<\/ol><\/dd>\n<dt id='which%20blocks%20are%20allowed%20to%20accept%20custom%20data%20attributes%3F'><h3>Which blocks are allowed to accept custom data attributes?<\/h3><\/dt>\n<dd><p>Currently, custom data attributes can be saved within the following blocks:<\/p>\n\n<ul>\n<li><code>core\/button<\/code><\/li>\n<li><code>core\/column<\/code><\/li>\n<li><code>core\/columns<\/code><\/li>\n<li><code>core\/heading<\/code><\/li>\n<li><code>core\/group<\/code><\/li>\n<li><code>core\/paragraph<\/code><\/li>\n<\/ul>\n\n<p>Generally, this would be possible due to a JavaScript hooks system with WordPress that includes block filters and several other types of filters available via JavaScript.<\/p>\n\n<p>You can extend the predefined list of block names by hooking into the <code>mypreview.blockDataAttributeAllowedBlocks<\/code> filter provided by the plugin.<\/p><\/dd>\n<dt id='how%20do%20i%20get%20help%20with%20the%20plugin%3F'><h3>How do I get help with the plugin?<\/h3><\/dt>\n<dd><p>The easiest way to receive support is to \u201cCreate a new topic\u201d by visiting Community Forums page <a href=\"https:\/\/wordpress.org\/support\/plugin\/block-data-attribute\" title=\"Block Data Attribute Support Forum\">here<\/a>.<\/p>\n\n<p>Make sure to check the \u201cNotify me of follow-up replies via email\u201d checkbox to receive notifications, as soon as a reply posted to your question or inquiry.<\/p>\n\n<p><em>Please note that this is an opensource 100% volunteer project, and it\u2019s not unusual to get reply days or even weeks later.<\/em><\/p><\/dd>\n<dt id='can%20i%20help%20in%20translating%20this%20plugin%20into%20a%20new%20language%3F'><h3>Can I help in translating this plugin into a new language?<\/h3><\/dt>\n<dd><p>The plugin is fully translation-ready and localized using the GNU framework, and translators are welcome to contribute to the plugin.<\/p>\n\n<p>Here\u2019s the the <a href=\"https:\/\/translate.wordpress.org\/projects\/wp-plugins\/block-data-attribute\" title=\"WordPress translation website\">WordPress translation website &#8594;<\/a><\/p><\/dd>\n<dt id='how%20do%20i%20contribute%20to%20this%20plugin%3F'><h3>How do I contribute to this plugin?<\/h3><\/dt>\n<dd><p>We welcome contributions in any form, and you can help reporting, testing, and detailing bugs.<\/p>\n\n<p>Here\u2019s the <a href=\"https:\/\/github.com\/mypreview\/block-data-attribute\" title=\"GitHub development repository\">GitHub development repository &#8594;<\/a><\/p><\/dd>\n<dt id='did%20you%20like%20the%20idea%20behind%20this%20plugin%3F'><h3>Did you like the idea behind this plugin?<\/h3><\/dt>\n<dd><p>If you or your company use any of my projects or like what I\u2019m doing, please consider <a href=\"https:\/\/www.buymeacoffee.com\/mahdiyazdani\">making a donation<\/a> so I can continue maintaining and evolving all my projects and new ones. I\u2019m in this for the long run.<\/p>\n\n<p>--AND\/OR--<\/p>\n\n<p>Please share your experience by leaving this plugin <a href=\"https:\/\/wordpress.org\/support\/plugin\/block-data-attribute\/reviews\/\" title=\"Rate Block Data Attribute 5 stars\">5 shining stars<\/a> if you like it, thanks!<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>2.0.2<\/h4>\n\n<ul>\n<li>Compatibility with WordPress 6.1<\/li>\n<\/ul>\n\n<h4>2.0.1<\/h4>\n\n<ul>\n<li>Added missing <code>data<\/code> keyword from the attribute name.<\/li>\n<\/ul>\n\n<h4>2.0.0<\/h4>\n\n<ul>\n<li>Define unlimited number of attributes.<\/li>\n<li>Compatibility with WordPress 6.0<\/li>\n<li>Updated node modules.<\/li>\n<\/ul>\n\n<h4>1.0.5<\/h4>\n\n<ul>\n<li>Fixed incorrect escaping in data <code>value<\/code> attribute pair.<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>Updated node modules.<\/li>\n<li>Compatibility with WordPress 5.5<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>Multiple code standards improvements.<\/li>\n<li>Compatibility with WordPress 5.4.1<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Multiple code standards improvements.<\/li>\n<li>Compatibility with WordPress 5.4.0<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Fixed Github repo web-address.<\/li>\n<li>Updated plugin banner image.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"This plugin designed with extensibility in mind for data that should be associated with a particular block type but need not have any defined meaning.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/117155","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=117155"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/mahdiyazdani"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=117155"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=117155"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=117155"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=117155"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=117155"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=117155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}