From 4b7ddd020b47e642b91717c7b695affe4e28b2a7 Mon Sep 17 00:00:00 2001 From: Ajit Bohra Date: Mon, 5 Nov 2018 13:03:33 +0530 Subject: [PATCH 1/3] Docs: Remove isDefault from registerBlockStyle --- docs/extensibility/extending-blocks.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/extensibility/extending-blocks.md b/docs/extensibility/extending-blocks.md index d00282e6b4665a..676f7fcf5dacd1 100644 --- a/docs/extensibility/extending-blocks.md +++ b/docs/extensibility/extending-blocks.md @@ -21,8 +21,6 @@ wp.blocks.registerBlockStyle( 'core/quote', { The example above registers a block style variation named `fancy-quote` to the `core/quote` block. When the user selects this block style variation from the styles selector, an `is-style-fancy-quote` className will be added to the block's wrapper. -By adding `isDefault: true`, you can make registered style variation to be active by default when a block is inserted. - To remove a block style variation use `wp.blocks.unregisterBlockStyle()`. _Example:_ From 492abb292dfe9bed7c9a45bcbae45e9e7740dd65 Mon Sep 17 00:00:00 2001 From: Ajit Bohra Date: Mon, 28 Jan 2019 03:36:41 +0530 Subject: [PATCH 2/3] Docs: clarify isDefault usage for registerBlockStyles() --- docs/designers-developers/developers/filters/block-filters.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/designers-developers/developers/filters/block-filters.md b/docs/designers-developers/developers/filters/block-filters.md index 069774d8e49a7a..ccc3802968fb4d 100644 --- a/docs/designers-developers/developers/filters/block-filters.md +++ b/docs/designers-developers/developers/filters/block-filters.md @@ -17,6 +17,8 @@ wp.blocks.registerBlockStyle( 'core/quote', { The example above registers a block style variation named `fancy-quote` to the `core/quote` block. When the user selects this block style variation from the styles selector, an `is-style-fancy-quote` className will be added to the block's wrapper. +By adding `isDefault: true` you can make the registered style variation to be used as a fallback if no style in `registerBlockType()` has been set as the default. + To remove a block style variation use `wp.blocks.unregisterBlockStyle()`. _Example:_ From dfb51a0aaead8f42f3011107cbea3aa09e1c0795 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20=28Greg=29=20Zi=C3=B3=C5=82kowski?= Date: Tue, 29 Jan 2019 00:16:59 +0530 Subject: [PATCH 3/3] Clarify isDefault Co-Authored-By: ajitbohra --- docs/designers-developers/developers/filters/block-filters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/designers-developers/developers/filters/block-filters.md b/docs/designers-developers/developers/filters/block-filters.md index ccc3802968fb4d..51df2258185736 100644 --- a/docs/designers-developers/developers/filters/block-filters.md +++ b/docs/designers-developers/developers/filters/block-filters.md @@ -17,7 +17,7 @@ wp.blocks.registerBlockStyle( 'core/quote', { The example above registers a block style variation named `fancy-quote` to the `core/quote` block. When the user selects this block style variation from the styles selector, an `is-style-fancy-quote` className will be added to the block's wrapper. -By adding `isDefault: true` you can make the registered style variation to be used as a fallback if no style in `registerBlockType()` has been set as the default. +By adding `isDefault: true` you can mark the registered style variation as the one that is recognized as active when no custom class name is provided. It also means that there will be no custom class name added to the HTML output for the style that is marked as default. To remove a block style variation use `wp.blocks.unregisterBlockStyle()`.