Skip to content

Commit 53d0744

Browse files
committed
write changelog
1 parent 561882c commit 53d0744

2 files changed

Lines changed: 23 additions & 2 deletions

File tree

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,12 @@ Modify available button styles.
562562

563563
```javascript
564564
function myButtonStyleOptions( styleOptions ) {
565-
styleOptions.push( { label: 'My Option', value: 'my-option', bgColor: '#FF0000', color: '#FFFFFF } );
565+
styleOptions.push( {
566+
label: 'My Option',
567+
value: 'my-option',
568+
bgColor: '#ff0000',
569+
textColor: '#ffffff',
570+
} );
566571
return styleOptions;
567572
}
568573
wp.hooks.addFilter(
@@ -576,6 +581,13 @@ wp.hooks.addFilter(
576581

577582
* `styleOptions` (`Array`) Array with button style options.
578583

584+
Each `styleOption` object should have the following attributes:
585+
586+
* `label` (`string`) Label displayed in the select box.
587+
* `value` (`string`) Value of the chosen option.
588+
* `bgColor` (`string`) Background color of button shown in the editor.
589+
* `textColor` (`string`) Text color of button shown in the editor.
590+
579591
### wpBootstrapBlocks.container.marginAfterOptions
580592

581593
Modify margin after options.
@@ -598,6 +610,11 @@ wp.hooks.addFilter(
598610

599611
* `marginAfterOptions` (`Array`) Array margin options.
600612

613+
Each `marginAfterOption` object should have the following attributes:
614+
615+
* `label` (`string`) Label displayed in the select box.
616+
* `value` (`string`) Value of the chosen option.
617+
601618
### wpBootstrapBlocks.row.templates
602619

603620
Define block templates.
@@ -639,7 +656,7 @@ wp.hooks.addFilter(
639656

640657
* `templates` (`array`) List of template objects.
641658

642-
Each template has the following attributes:
659+
Each `template` object should have the following attributes:
643660

644661
* `name` (`string`) Unique identifier of the template
645662
* `title` (`string`) Name of template

readme.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ Please create a new GitHub issue and let us know: [https://github.com/liip/boots
143143

144144
== Changelog ==
145145

146+
= 5.1.0 =
147+
148+
* [CHANGE] Renamed `color` attribute of the `styleOptions` for the button block to `bgColor`. Additionally added `textColor` attribute to be able to change the text color of the button in the editor as well. If you are modifying the `styleOptions` via the [`wpBootstrapBlocks.button.styleOptions`](https://github.com/liip/bootstrap-blocks-wordpress-plugin#wpbootstrapblocksbuttonstyleoptions) JavaScript filter please add the according colors to your style objects.
149+
146150
= 5.0.0 =
147151

148152
Starting with this version the plugin only supports WordPress versions >= 5.3.

0 commit comments

Comments
 (0)