diff --git a/src/advanced-gutenberg.php b/src/advanced-gutenberg.php
index 3d32ebe58..81c998bca 100644
--- a/src/advanced-gutenberg.php
+++ b/src/advanced-gutenberg.php
@@ -3,7 +3,7 @@
* Plugin Name: PublishPress Blocks
* Plugin URI: https://publishpress.com/blocks/
* Description: Enhanced tools for Gutenberg editor
- * Version: 2.5.4
+ * Version: 2.5.5
* Tested up to: 5.6.1
* Author: PublishPress
* Author URI: https://publishpress.com/
@@ -17,7 +17,7 @@
*
* @copyright 2014-2020 Joomunited
* @copyright 2020 Advanced Gutenberg. help@advancedgutenberg.com
- * @copyright 2020 PublishPress. help@publishpress.com
+ * @copyright 2020-2021 PublishPress. help@publishpress.com
*
* Original development of this plugin was kindly funded by Joomunited
*
@@ -76,7 +76,7 @@ function advgb_show_error()
}
if (! defined('ADVANCED_GUTENBERG_VERSION')) {
- define('ADVANCED_GUTENBERG_VERSION', '2.5.4');
+ define('ADVANCED_GUTENBERG_VERSION', '2.5.5');
}
if (! defined('ADVANCED_GUTENBERG_PLUGIN')) {
@@ -117,10 +117,10 @@ function advg_language_domain_init()
plugin_dir_path(__FILE__) . 'languages/' . 'advanced-gutenberg' . '-' . get_locale() . '.mo'
);
}
-
+
wp_set_script_translations(
- 'editor',
- 'advanced-gutenberg',
+ 'editor',
+ 'advanced-gutenberg',
plugin_dir_path( __FILE__ ) . 'languages'
);
}
diff --git a/src/assets/blocks/accordion/block.jsx b/src/assets/blocks/accordion/block.jsx
index b186fe9a2..1a3ad3cec 100644
--- a/src/assets/blocks/accordion/block.jsx
+++ b/src/assets/blocks/accordion/block.jsx
@@ -305,7 +305,7 @@
},
borderWidth: {
type: 'number',
- default: 0,
+ default: 1,
},
borderColor: {
type: 'string',
@@ -393,6 +393,56 @@
);
},
+ deprecated: [
+ {
+ attributes: {
+ ...accordionAttrs,
+ borderWidth: {
+ type: 'number',
+ default: 0,
+ },
+ },
+ save: function ( { attributes } ) {
+ const {
+ borderWidth,
+ } = attributes;
+
+ return (
+
+
+
+
+
+
{ header }
+
+
+
+
+
+ );
+ }
+ }
+ ],
transforms: {
to: [
{
@@ -415,4 +465,4 @@
]
},
} );
-})( wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components );
\ No newline at end of file
+})( wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components );
diff --git a/src/assets/blocks/advaccordion/accordion.jsx b/src/assets/blocks/advaccordion/accordion.jsx
index 7de3bf37b..2d8507c0a 100644
--- a/src/assets/blocks/advaccordion/accordion.jsx
+++ b/src/assets/blocks/advaccordion/accordion.jsx
@@ -232,6 +232,7 @@
className="advgb-accordion-header-title"
placeholder={ __( 'Enter header…', 'advanced-gutenberg' ) }
style={ { color: 'inherit' } }
+ allowedFormats={ [ 'core/bold', 'core/italic', 'core/image', 'core/strikethrough' ] }
/>
+
+
+
+
+
{ header }
+
+
+
+
+
+ );
+ },
+ },
+ {
+ attributes: {
+ borderWidth: {
+ type: 'number',
+ default: 0,
+ },
+ },
+ save: function ( { attributes } ) {
+ const {
+ borderWidth,
+ } = attributes;
+
return (
-
-
+ this.resyncAccordions() }
+ label={__('Refresh', 'advanced-gutenberg')}
/>
-
+
@@ -314,7 +315,7 @@
},
borderWidth: {
type: 'number',
- default: 0,
+ default: 1,
},
borderColor: {
type: 'string',
@@ -392,6 +393,24 @@
);
},
deprecated: [
+ {
+ attributes: {
+ ...blockAttrs,
+ borderWidth: {
+ type: 'number',
+ default: 0,
+ }
+ },
+ save: function ( { attributes } ) {
+ const { collapsedAll } = attributes;
+
+ return (
+
+
+
+ );
+ },
+ },
{
attributes: {
...blockAttrs,
@@ -412,4 +431,4 @@
}
]
} )
-})( wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components, wp.compose );
\ No newline at end of file
+})( wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components, wp.compose );
diff --git a/src/assets/blocks/advbutton/block.jsx b/src/assets/blocks/advbutton/block.jsx
index ecd2e3f62..ac1d74a4a 100644
--- a/src/assets/blocks/advbutton/block.jsx
+++ b/src/assets/blocks/advbutton/block.jsx
@@ -8,7 +8,13 @@ import {AdvColorControl} from "../0-adv-components/components.jsx";
const { InspectorControls, BlockControls, BlockAlignmentToolbar, RichText, PanelColorSettings, URLInput } = wpBlockEditor;
const { BaseControl, RangeControl, PanelBody, ToggleControl, SelectControl, ToolbarButton, ToolbarGroup } = wpComponents;
- const previewImageData = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAABoCAYAAADYQu11AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAEMFJREFUeNrsnQlsFNcZx2d2vLZZ29hgfIRgQBgKJXZrp6sCroPAECAREaRGrRASqUqC3aJGcYCQSI0UFdGWNm2UywqiOVqkcCQYUNsk1ChO5cYNV0wJdmJcgx0bJw7FB7693t2+b7PjvH1+M7szO3t/f+kxu2aP2Tff733HezMjCCgUCoVCoVAoFAqFQqFQKBQKhUKhUCgUCoVCoVAoFAqFQqFQKFRESYzUHY+Li4vo/UdFvJzj4+MIusFA8/ZVjKaBCxX+YPvwN9fzcBwAxDCGW1TYT1Fhi7CjggW508s27KAXwwxuNZBFqimBjpCjggE7Dba3x2EBvRimgPPgVmoCAo8KoSf31ia9LxTAi2EAuRrUJvZxUVFRfEVFRc6sWbPmWCyWTLPZPE2SpGRRFM0c+FEo/0h3Oh2kjdnt9v6RkZFbAwMDXc3NzZ/v3bu3s62tzU4B7VB4zAU/2LCLYQi4idqaCMymo0ePLpw7d641JSVleWJi4gYC9RQ0QVQo5XA4vhwaGnqnp6en7tKlSxcefvjhNgpyB+dxSIEXQwy4wIA9Afhzzz2XuXr16rXTp0//KXmfFU0LFc6Of3R0tPqLL75487XXXvvgwIEDfRTkDg78QYddDCHkLNwSbI8dO5a7ZMmSp4jn3uT+OwoVSaH+SH9//59feOGF37/44ovdbrDtCtAHDXgxyJCzXlySPfgrr7xy53333fcMAbyUPDejyaAiXLbe3t4D5eXlv62pqRmigLcrAB9Q2MUgQ057ct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FDdlOp310dPRzAvV/Tp8+feyJJ55gL+bInv/Bwm6nXhMwyAMKOgO7IFBntnGAZ0GngZebuHr16tTNmzfflZeX9/309PQCAn4m+Y6pULUXRdGMpocKDM9Om91uHyDg9RKwvyS6eP78+bNHjhxpIVv6Bgu8q8LwILcLymelGQ55wEHnwC4ywEtM/s5CPgl2Qfmm8Dgfjwo49Jwte4VWB+OplZojWJAHDQ4O7Ox8u4kDuK+wC5wtChUIwNUgl4G1K4TtDhXADS28hQx0CnjuOngGZBZuJdBNnMEDhQqWN3d4CdkdHOjZmzAE1IuHDHQfvDsPehZykw+gI/SoQHlzXmO9NA9spZsvOINxvfmQAEHdv00NeB78Iid8x9AdFWyPrgS72jYkgIeF5+N4d15YLwrKhTgEHRWq0F0Ndm+3OXYG+64xYQEGA7zAgVgNcAzZUaEEXVCBOuSAhyUYCiG9oAC2khdH2FGBzNPVYOfCDf+E+r5vYQ0FVaXn7S8CjgoX4IVw8dwRCbqX8B4BR4UL8AGdA48p0HV4fxTKULgj6bbLKBQKhUKhUCgUCoVCoVAoFAqFQqFQKBQKhUKhUCgUCoVCoVAoVITr/wIMAH6+b9Z51AT3AAAAAElFTkSuQmCC';
+ // Preview style images
+ let previewImageData = '';
+ const previewImageDataDefault = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAABoCAYAAADYQu11AAAJXUlEQVR4nO3dW4gVdRwH8K/t5obm4hWvaGhuLrgUeuxJ66kLBt0eukBB9Va9FNlLl5eCHoqoHuyxpB66PWhBgr4l9lJrUBqaoqR4RVNxU3JbKb7L/8jZ8X88M7u//8x/Zr4fOCC77tzO/zvzv80MRERERERERERERERERERERERERERERERERERERERERESkniZZ7vXg4GDog9gNYA2AVQD6AfQBuAXALAC97vcilkYAXADwF4A/AewHsBfALwB+dr8PptFomAUndjMBPAFgPYC7AExTMZYcdbsyyM9yAPe0rHoIwA4AWwF8CeBsrF/MDRFsQzv3AtgM4DiAjQAeUMglMtNcudzoyulmV26jE1vQ2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gdKJT6DYBPFZuO11/XVsB1n/bn+2NnVRih10oRGl6Bybho2Z5uP+gKdKjlVYH113gVdv0CTrd/UddfLWW70GdVj8T/YYvu0y1UkYVoXbyKeQntb9D7Mgn3F0EvEHPVGbVARXu6FX6NGctC7cuuntJua/Q6DzofmgBLpedpMq2qoYrOnV5PS2yM0X8j6C1Sd73sCjNq6fR/jUVjWhd1OU9OTtr2qjX67JqfKLvCTF4rV5iJkVW08/Pzlb5uuyLoiTTZU3bNuDwVfK2za2yu8anf4mXXoeuUbZs6Dt2qvmZcK/Qd6ZzHDh062Y8qj61er79bP6FAlWq1WiUZZdYdMICgAwYQdMAAgg4YQNABAwg6YABBBwwg6IABBB0wgKADBhB0wACCDhhA0AEDCDpgAEEHDCDogAEEHTCAoAMGEHQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIDWOed+AS3cOPlbAUbbAAAAAElFTkSuQmCC';
+
class AdvButton extends Component {
constructor() {
super( ...arguments );
@@ -68,8 +74,9 @@ import {AdvColorControl} from "../0-adv-components/components.jsx";
hoverOpacity, transitionSpeed, isPreview
} = attributes;
- const isStyleSquared = className.indexOf('-squared') > -1;
- const isStyleOutlined = className.indexOf('-outline') > -1;
+ const isStyleSquared = className.indexOf('-squared') > -1;
+ const isStyleOutlined = className.indexOf('-outlined') > -1;
+ const isStyleSquaredOutline = className.indexOf('-squared-outline') > -1;
const hoverColorSettings = [
{
label: __( 'Background Color', 'advanced-gutenberg' ),
@@ -88,8 +95,16 @@ import {AdvColorControl} from "../0-adv-components/components.jsx";
},
];
- if (isStyleOutlined) {
+ if (isStyleSquaredOutline) {
+ hoverColorSettings.shift();
+ previewImageData = previewImageDataSquaredOutline;
+ } else if (isStyleOutlined) {
hoverColorSettings.shift();
+ previewImageData = previewImageDataOutlined;
+ } else if (isStyleSquared) {
+ previewImageData = previewImageDataSquared;
+ } else {
+ previewImageData = previewImageDataDefault;
}
return (
@@ -603,4 +618,4 @@ import {AdvColorControl} from "../0-adv-components/components.jsx";
},
],
} );
-})( wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components );
\ No newline at end of file
+})( wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components );
diff --git a/src/assets/blocks/advimage/block.jsx b/src/assets/blocks/advimage/block.jsx
index 168c3e2db..199971ba2 100644
--- a/src/assets/blocks/advimage/block.jsx
+++ b/src/assets/blocks/advimage/block.jsx
@@ -40,9 +40,7 @@
const { attributes, setAttributes, clientId } = this.props;
const { blockIDX } = attributes;
- if (!blockIDX) {
- setAttributes({blockIDX: `advgb-img-${clientId}`});
- }
+ setAttributes({blockIDX: `advgb-img-${clientId}`});
}
render() {
@@ -247,6 +245,7 @@
unstableOnFocus={ () => this.setState( { currentEdit: 'title' } ) }
unstableOnSplit={ () => null }
placeholder={ __( 'Enter title…', 'advanced-gutenberg' ) }
+ allowedFormats={ [] }
/>
this.setState( { currentEdit: 'subtitle' } ) }
unstableOnSplit={ () => null }
placeholder={ __( 'Enter subtitle…', 'advanced-gutenberg' ) }
+ allowedFormats={ [] }
/>