Skip to content

Commit 542b43a

Browse files
Merge pull request #77 from HardeepAsrani/development
Add HTML Anchor to Section Block. Change Default Section setting. Fix resizer styles. Add Link Component. Add Marker button to Map. Remove Padding Resizer. Better UI for Sizing Control. Fix Dynamic CSS not rendering on reusable blocks. Validate blocks before importing.
2 parents 4fe69e8 + e77c910 commit 542b43a

14 files changed

+42
-13
lines changed

build/build.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/build.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

class-otter-blocks.php

+15
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ public function load_gutenberg_blocks() {
7070
if ( class_exists( '\ThemeIsle\GutenbergCSS' ) && get_option( 'themeisle_blocks_settings_css_module', true ) ) {
7171
\ThemeIsle\GutenbergCSS::instance();
7272
}
73+
74+
if ( class_exists( '\ThemeIsle\GutenbergAnimation' ) && get_option( 'themeisle_blocks_settings_blocks_animation', true ) ) {
75+
\ThemeIsle\GutenbergAnimation::instance();
76+
}
7377
}
7478

7579
/**
@@ -129,6 +133,17 @@ public function register_settings() {
129133
'default' => true,
130134
)
131135
);
136+
137+
register_setting(
138+
'themeisle_blocks_settings',
139+
'themeisle_blocks_settings_blocks_animation',
140+
array(
141+
'type' => 'boolean',
142+
'description' => __( 'Blocks Animation module allows to add CSS animations to each block in Block Editor.', 'otter-blocks' ),
143+
'show_in_rest' => true,
144+
'default' => true,
145+
)
146+
);
132147
}
133148

134149
/**

composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"require": {
66
"codeinwp/gutenberg-blocks": "dev-master",
77
"codeinwp/gutenberg-css": "dev-master",
8+
"codeinwp/gutenberg-animation": "dev-master",
89
"codeinwp/themeisle-sdk": "dev-master"
910
},
1011
"license": "GPL-2.0+",

grunt/version.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = {
1616
prefix: 'Version\\:\.*\\s'
1717
},
1818
src: [
19-
'otter.php',
19+
'otter-blocks.php',
2020
]
2121
}
2222
};

otter-blocks.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Gutenberg Blocks and Template Library by Otter
44
* Plugin URI: https://themeisle.com/plugins/otter-blocks
55
* Description: Create beautiful and attracting posts, pages, and landing pages with Gutenberg Blocks and Template Library by Otter. Otter comes with dozens of Gutenberg blocks that are all you need to build beautiful pages.
6-
* Version: 1.2.1
6+
* Version: 1.2.2
77
* Author: ThemeIsle
88
* Author URI: https://themeisle.com
99
* License: GPL-2.0+
@@ -22,7 +22,7 @@
2222
define( 'OTTER_BLOCKS_BASEFILE', __FILE__ );
2323
define( 'OTTER_BLOCKS_URL', plugins_url( '/', __FILE__ ) );
2424
define( 'OTTER_BLOCKS_PATH', dirname( __FILE__ ) );
25-
define( 'OTTER_BLOCKS_VERSION', '1.2.1' );
25+
define( 'OTTER_BLOCKS_VERSION', '1.2.2' );
2626
define( 'OTTER_BLOCKS_DEV', false );
2727

2828
$vendor_file = OTTER_BLOCKS_PATH . '/vendor/autoload.php';

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "otter-blocks",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"description": "Gutenberg Blocks and Template Library by Otter",
55
"scripts": {
66
"build": "cross-env BABEL_ENV=default NODE_ENV=production webpack",

readme.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ It has:
4747
## Changelog ##
4848
### 1.2.1 - 2019-04-20 ###
4949

50-
* Update version
50+
* Fixed issue with constant not being checked in Otter
51+
* Added error handling in Backbone functions
5152

5253

5354
### 1.2.0 - 2019-04-18 ###

readme.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ It has:
4747
== Changelog ==
4848
= 1.2.1 - 2019-04-20 =
4949

50-
* Update version
51-
50+
* Fixed issue with constant not being checked in Otter
51+
* Added error handling in Backbone functions
5252

5353
= 1.2.0 - 2019-04-18 =
5454

src/Components/Main.js

+11
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class Main extends Component {
3939
isAPISaving: false,
4040
notification: null,
4141
cssModule: false,
42+
blocksAnimation: false,
4243
isDefaultSection: true,
4344
googleMapsAPI: ''
4445
};
@@ -52,6 +53,7 @@ class Main extends Component {
5253
this.settings.fetch().then( response => {
5354
this.setState({
5455
cssModule: Boolean( response.themeisle_blocks_settings_css_module ),
56+
blocksAnimation: Boolean( response.themeisle_blocks_settings_blocks_animation ),
5557
isDefaultSection: Boolean( response.themeisle_blocks_settings_default_block ),
5658
googleMapsAPI: response.themeisle_google_map_block_api_key,
5759
isAPILoaded: true
@@ -151,6 +153,15 @@ class Main extends Component {
151153
onChange={ () => this.changeOptions( 'themeisle_blocks_settings_css_module', 'cssModule', ! this.state.cssModule ) }
152154
/>
153155
</PanelRow>
156+
157+
<PanelRow>
158+
<ToggleControl
159+
label={ __( 'Enable Blocks Animation Module' ) }
160+
help={ 'Blocks Animation module allows to add CSS animations to each block in Block Editor.' }
161+
checked={ this.state.blocksAnimation }
162+
onChange={ () => this.changeOptions( 'themeisle_blocks_settings_blocks_animation', 'blocksAnimation', ! this.state.blocksAnimation ) }
163+
/>
164+
</PanelRow>
154165
</PanelBody>
155166
</div>
156167

src/Components/Onboarding.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Onboarding extends Component {
3434
},
3535
{
3636
target: '.otter-step-two',
37-
content: __( 'Jazz up your blocks with some sparkly custom CSS right inside the block. CSS Modules allow you to add custom CSS to your blocks in the Block Editor.' )
37+
content: __( 'Jazz up your blocks with some sparkly custom CSS or Blocks Animation right inside the block. Here you can enable modules to enhance your experience with Block Editor.' )
3838
},
3939
{
4040
target: '.otter-step-three',

src/style.scss

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676

7777
.components-panel__row {
7878
padding: 20px 10px 10px;
79+
margin: 0;
7980

8081
.components-base-control {
8182

tests/bootstrap.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
* Manually load the plugin being tested.
2020
*/
2121
function _manually_load_plugin() {
22-
require dirname( dirname( __FILE__ ) ) . '/otter.php';
22+
require dirname( dirname( __FILE__ ) ) . '/otter-blocks.php';
2323
}
2424

2525
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
2626
// Start up the WP testing environment.
2727
require $_tests_dir . '/includes/bootstrap.php';
28-
activate_plugin( 'otter-blocks/otter.php' );
28+
activate_plugin( 'otter-blocks/otter-blocks.php' );
2929
global $current_user;
3030
$current_user = new WP_User( 1 );
3131
$current_user->set_role( 'administrator' );

themeisle-hash.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"class-otter-blocks.php":"956ba187f214a15c4ce9f593eb3bbcad","otter.php":"31b2a344a3d85775f2d60af46b3f5f2d","webpack.config.js":"c2c576307763cb6907cc0baa3eba3c1a"}
1+
{"class-otter-blocks.php":"d695cc3e89079f6208aa86a62b0b4755","otter-blocks.php":"31b2a344a3d85775f2d60af46b3f5f2d","webpack.config.js":"c2c576307763cb6907cc0baa3eba3c1a"}

0 commit comments

Comments
 (0)