Skip to content

Commit

Permalink
release 1.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
michelegiorgi committed Jul 2, 2021
1 parent f143ba3 commit f8fa7fc
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 28 deletions.
2 changes: 1 addition & 1 deletion admin/class-formality-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function block_categories($categories, $post) {
}

public function filter_blocks($allowed_block_types, $editorcontext) {
$post = is_object($editorcontext) ? $editorcontext->post : get_post();
$post = property_exists($editorcontext, 'post') ? $editorcontext->post : $editorcontext;
if ( $post->post_type == 'formality_form' ) { return $this->get_allowed('blocks'); }
return $allowed_block_types;
}
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
"sass-loader": "^9.0.3",
"stylelint": "^13.6.1",
"stylelint-config-standard": "^20.0.0",
"vue-template-compiler": "^2.6.12"
"vue-template-compiler": "^2.6.12",
"laravel-mix-banner": "^0.1.4"
},
"dependencies": {
"clone-deep": "^4.0.1",
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ You will find **Formality** menu in your WordPress admin screen.
== Changelog ==

= 1.3.4 =
Release Date: Jun 28th, 2021
Release Date: Jul 2nd, 2021

* Add email notification template
* Gutenberg 10.9+ compatibility
Expand Down
50 changes: 25 additions & 25 deletions webpack.mix.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Mix.manifest.refresh = _ => void 0
const mix = require('laravel-mix');
const devUrl = 'formality.local';
require('laravel-mix-copy-watched');
require('laravel-mix-banner');

mix
.setPublicPath('./dist')
Expand All @@ -15,6 +16,7 @@ mix
.js('assets/scripts/public.js', 'scripts/formality-public.js')
.js('assets/scripts/editor.js', 'scripts/formality-editor.js')
.js('assets/scripts/admin.js', 'scripts/formality-admin.js')
.banner({ banner: 'Formality v1.3.4' });

mix
.copyWatched('assets/images/admin/**', 'dist/images/admin')
Expand All @@ -27,29 +29,27 @@ mix
], 'dist/fonts');

mix
.webpackConfig({
externals: {
wp: 'wp',
react: 'React',
jquery: 'jQuery',
'react-dom': 'ReactDOM',
lodash: 'lodash',
},
})
.autoload({ jquery: ['$', 'window.jQuery'] })
.options({
processCssUrls: false,
terser: {
terserOptions: {
mangle: {
reserved:['__']
},
output: {
comments: false
}
.webpackConfig({
externals: {
wp: 'wp',
react: 'React',
jquery: 'jQuery',
'react-dom': 'ReactDOM',
lodash: 'lodash',
},
extractComments: false
}
})
.sourceMaps(false, 'source-map')
.version();
})
.autoload({ jquery: ['$', 'window.jQuery'] })
.options({
processCssUrls: false,
terser: {
terserOptions: {
mangle: { reserved: ['__'] },
output: {
comments ({}, { value }) { return value.startsWith("! Formality v") }
}
},
extractComments: false
}
})
.sourceMaps(false, 'source-map')
.version();
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5221,6 +5221,11 @@ known-css-properties@^0.21.0:
resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.21.0.tgz#15fbd0bbb83447f3ce09d8af247ed47c68ede80d"
integrity sha512-sZLUnTqimCkvkgRS+kbPlYW5o8q5w1cu+uIisKpEWkj31I8mx8kNG162DwRav8Zirkva6N5uoFsm9kzK4mUXjw==

laravel-mix-banner@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/laravel-mix-banner/-/laravel-mix-banner-0.1.4.tgz#9ae50c070315ba283cad72fbcf54ea23fa55413b"
integrity sha512-GXLohbaRdFbS5cmaqlOJb45RlDe7n//AdVkOrO4c/citt+A4jmQ2BxeJdni6tGOyFVnEKtZRuYVyzyKdd2DOpg==

laravel-mix-copy-watched@^2.2.4:
version "2.3.0"
resolved "https://registry.yarnpkg.com/laravel-mix-copy-watched/-/laravel-mix-copy-watched-2.3.0.tgz#471d84b8130f66c567135d2c4971799694dd5466"
Expand Down

0 comments on commit f8fa7fc

Please sign in to comment.