Skip to content

Commit

Permalink
Merge pull request #130 from philbuchanan/#129
Browse files Browse the repository at this point in the history
Rolled back registerStore change (#129)
  • Loading branch information
philbuchanan authored Apr 7, 2021
2 parents e800893 + 3131abc commit c645029
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion accordion-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin Name: Accordion Blocks
* Plugin URI: https://github.com/philbuchanan/Accordion-Blocks
* Description: Gutenberg blocks for creating responsive accordion drop-downs.
* Version: 1.3.2
* Version: 1.3.3
* Requires at least: 5.5
* Author: Phil Buchanan
* Author URI: https://philbuchanan.com
Expand Down
2 changes: 1 addition & 1 deletion build/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => 'c95809e16efa6ce8d33b9ca72e3cca78');
<?php return array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => '84e71aa3659a6d0dbc365ce66ce02441');
2 changes: 1 addition & 1 deletion build/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "accordion-blocks",
"version": "1.3.2",
"version": "1.3.3",
"description": "Gutenberg blocks for creating responsive accordion drop-downs.",
"main": "src/index.js",
"scripts": {
Expand Down
8 changes: 7 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Donate Link: https://philbuchanan.com/donate/
Tags: accordion, accordions, gutenberg, block, responsive
Requires at least: 5.5
Tested up to: 5.7
Stable tag: 1.3.2
Stable tag: 1.3.3
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -89,6 +89,9 @@ For bug reports or feature requests or if you'd like to contribute to the plugin
2. Accordion block in the editor

== Changelog ==
= 1.3.3 =
* Fixed: Rolled back deprecated `registerStore` with `register` change since it only applies to WordPress 5.7+.

= 1.3.2 =
* New: Visual indicator of bottom of block when the block is selected.
* New: Only load plugin assets when the page contains an accordion block.
Expand Down Expand Up @@ -166,6 +169,9 @@ For bug reports or feature requests or if you'd like to contribute to the plugin
* All new plugin to support the new WordPress Gutenberg editor.

== Upgrade Notice ==
= 1.3.3 =
Rolled back deprecated `registerStore` with `register` change since it only applies to WordPress 5.7+.

= 1.3.2 =
Only load assets on pages that use the block. Added visual indicator to show bottom of block.

Expand Down
6 changes: 2 additions & 4 deletions src/store/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { createReduxStore, register } from '@wordpress/data';
import { registerStore } from '@wordpress/data';
import apiFetch from '@wordpress/api-fetch';

const initialState = {
Expand Down Expand Up @@ -35,7 +35,7 @@ const actions = {
},
};

const store = createReduxStore('accordion-blocks', {
registerStore('accordion-blocks', {
reducer(state = initialState, action) {
switch (action.type) {
case 'SET_DEFAULTS':
Expand Down Expand Up @@ -84,5 +84,3 @@ const store = createReduxStore('accordion-blocks', {
},
},
});

register(store);

0 comments on commit c645029

Please sign in to comment.