Skip to content

Commit

Permalink
Merge pull request #169 from publishpress/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
htmgarcia authored Oct 19, 2020
2 parents 19348e3 + e6222bb commit 20768cd
Show file tree
Hide file tree
Showing 16 changed files with 55 additions and 99 deletions.
11 changes: 6 additions & 5 deletions src/advanced-gutenberg.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php
/**
* Plugin Name: Advanced Gutenberg
* Plugin URI: https://advancedgutenberg.com
* Plugin URI: https://publishpress.com/advanced-gutenberg/
* Description: Enhanced tools for Gutenberg editor
* Version: 2.4.6
* Version: 2.4.7
* Tested up to: 5.5.1
* Author: Advanced Gutenberg
* Author URI: https://advancedgutenberg.com
* Author: PublishPress
* Author URI: https://publishpress.com/
* License: GPL2
* Text Domain: advanced-gutenberg
* Domain Path: /languages
Expand All @@ -17,6 +17,7 @@
*
* @copyright 2014-2020 Joomunited
* @copyright 2020 Advanced Gutenberg. help@advancedgutenberg.com
* @copyright 2020 PublishPress. help@publishpress.com
*
* Original development of this plugin was kindly funded by Joomunited
*
Expand Down Expand Up @@ -75,7 +76,7 @@ function advgb_show_error()
}

if (! defined('ADVANCED_GUTENBERG_VERSION')) {
define('ADVANCED_GUTENBERG_VERSION', '2.4.6');
define('ADVANCED_GUTENBERG_VERSION', '2.4.7');
}

if (! defined('ADVANCED_GUTENBERG_PLUGIN')) {
Expand Down
2 changes: 2 additions & 0 deletions src/assets/blocks/advicon/block.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -529,13 +529,15 @@ import {IconListPopupHook} from "../0-adv-components/icon-class.jsx";
save: ( { attributes } ) => {
const {
blockIDX,
className,
items,
numberItem
} = attributes;

const blockWrapClass = [
'wp-block-advgb-icon',
'icon-wrapper',
className,
blockIDX
].filter( Boolean ).join( ' ' );

Expand Down
10 changes: 6 additions & 4 deletions src/assets/blocks/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -8395,11 +8395,12 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
save: function save(_ref) {
var attributes = _ref.attributes;
var blockIDX = attributes.blockIDX,
className = attributes.className,
items = attributes.items,
numberItem = attributes.numberItem;


var blockWrapClass = ['wp-block-advgb-icon', 'icon-wrapper', blockIDX].filter(Boolean).join(' ');
var blockWrapClass = ['wp-block-advgb-icon', 'icon-wrapper', className, blockIDX].filter(Boolean).join(' ');

var blockClass = ['advgb-icons'].filter(Boolean).join(' ');

Expand Down Expand Up @@ -16985,7 +16986,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
Button,
{ className: 'advgb-button',
key: index,
isDefault: true,
isSecondary: setting.value !== editorWidth,
isPrimary: setting.value === editorWidth,
onClick: function onClick() {
return _this2.onUpdateMeta({ advgb_blocks_editor_width: setting.value });
Expand All @@ -17012,7 +17013,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
Button,
{ className: 'advgb-button',
key: index,
isDefault: true,
isSecondary: setting.value !== columnsVisualGuide,
isPrimary: setting.value === columnsVisualGuide,
onClick: function onClick() {
return _this2.onUpdateMeta({ advgb_blocks_columns_visual_guide: setting.value });
Expand Down Expand Up @@ -19306,6 +19307,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
save: function save(_ref) {
var attributes = _ref.attributes;
var blockIDX = attributes.blockIDX,
className = attributes.className,
title = attributes.title,
titleHtmlTag = attributes.titleHtmlTag,
text = attributes.text,
Expand All @@ -19314,7 +19316,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
align = attributes.align;


var blockWrapClass = ['wp-block-advgb-infobox', 'advgb-infobox-wrapper', "has-text-align-" + align, blockIDX].filter(Boolean).join(' ');
var blockWrapClass = ['wp-block-advgb-infobox', 'advgb-infobox-wrapper', "has-text-align-" + align, className, blockIDX].filter(Boolean).join(' ');

var blockClass = ['advgb-infobox-wrap'].filter(Boolean).join(' ');

Expand Down
4 changes: 2 additions & 2 deletions src/assets/blocks/editor-sidebar/sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
{EDITOR_WIDTH_SETTINGS.map((setting, index) => (
<Button className="advgb-button"
key={ index }
isDefault
isSecondary={ setting.value !== editorWidth }
isPrimary={ setting.value === editorWidth }
onClick={ () => this.onUpdateMeta( { advgb_blocks_editor_width: setting.value } ) }
>
Expand All @@ -93,7 +93,7 @@
{VISUAL_GUIDE_SETTINGS.map((setting, index) => (
<Button className="advgb-button"
key={ index }
isDefault
isSecondary={ setting.value !== columnsVisualGuide }
isPrimary={ setting.value === columnsVisualGuide }
onClick={ () => this.onUpdateMeta( { advgb_blocks_columns_visual_guide: setting.value } ) }
>
Expand Down
2 changes: 2 additions & 0 deletions src/assets/blocks/infobox/block.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,7 @@ import {IconListPopupHook} from "../0-adv-components/icon-class.jsx";
save: ( { attributes } ) => {
const {
blockIDX,
className,
title,
titleHtmlTag,
text,
Expand All @@ -1019,6 +1020,7 @@ import {IconListPopupHook} from "../0-adv-components/icon-class.jsx";
'wp-block-advgb-infobox',
'advgb-infobox-wrapper',
`has-text-align-${align}`,
className,
blockIDX
].filter( Boolean ).join( ' ' );

Expand Down
36 changes: 2 additions & 34 deletions src/assets/css/blocks_styles/blocks.css
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,12 @@
max-width: inherit;
}

.advgb-editor-col-guide-disable .advgb-columns > .editor-inner-blocks > .editor-block-list__layout > .wp-block:not(.is-selected) > .editor-block-list__block-edit:before {
.advgb-editor-col-guide-disable .advgb-columns > .block-editor-inner-blocks > .block-editor-block-list__layout > .wp-block:not(.is-selected) > .advgb-column {
border-style: none;
border-color: transparent;
}

.advgb-editor-col-guide-enable .advgb-columns > .editor-inner-blocks > .editor-block-list__layout > .wp-block:not(.is-selected) > .editor-block-list__block-edit:before,
.advgb-columns-wrapper .advgb-columns > .editor-inner-blocks > .editor-block-list__layout > .wp-block:not(.is-selected):hover > .editor-block-list__block-edit:before {
.advgb-editor-col-guide-enable .advgb-columns > .block-editor-inner-blocks > .block-editor-block-list__layout > .wp-block:not(.is-selected) > .advgb-column {
border: 1px dashed #ddd;
}

Expand All @@ -82,37 +81,6 @@
margin: 10px;
}

.advgb-editor-sidebar-content .components-button-group.advgb-button-group {
display: block;
}

.advgb-editor-sidebar-content .components-button.advgb-button.is-button {
display: block;
width: 100%;
margin: 10px 0;
padding: 5px;
height: auto;
box-shadow: none;
outline: none;
}

.advgb-editor-sidebar-content .components-button.advgb-button.is-button:focus {
outline: none;
box-shadow: none;
}

.advgb-editor-sidebar-content .components-button.advgb-button.is-button.is-default {
background-color: #fff;
color: #000;
}

.advgb-editor-sidebar-content .components-button.advgb-button.is-button.is-primary {
background-color: #2196f3;
border: 1px solid #2196f3;
text-shadow: none;
color: #fff;
}

/*Accordion block styles*/
#editor .advgb-accordion-block .advgb-accordion-header p.mce-content-body,
#editor .advgb-accordion-block .advgb-accordion-body p.mce-content-body {
Expand Down
2 changes: 1 addition & 1 deletion src/assets/css/blocks_styles/blocks.min.css

Large diffs are not rendered by default.

39 changes: 11 additions & 28 deletions src/assets/css/blocks_styles/blocks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,12 @@
max-width: inherit
}

.advgb-editor-col-guide-disable .advgb-columns > .editor-inner-blocks > .editor-block-list__layout > .wp-block:not(.is-selected) > .editor-block-list__block-edit:before {
.advgb-editor-col-guide-disable .advgb-columns > .block-editor-inner-blocks > .block-editor-block-list__layout>.wp-block:not(.is-selected) >.advgb-column {
border-style: none;
border-color: transparent;
}

.advgb-editor-col-guide-enable .advgb-columns > .editor-inner-blocks > .editor-block-list__layout > .wp-block:not(.is-selected) > .editor-block-list__block-edit:before,
.advgb-columns-wrapper .advgb-columns > .editor-inner-blocks > .editor-block-list__layout > .wp-block:not(.is-selected):hover > .editor-block-list__block-edit:before {
.advgb-editor-col-guide-enable .advgb-columns > .block-editor-inner-blocks > .block-editor-block-list__layout>.wp-block:not(.is-selected) >.advgb-column {
border: 1px dashed #ddd;
}

Expand All @@ -83,35 +82,19 @@
margin: 10px;
}

.advgb-editor-sidebar-content .components-button-group.advgb-button-group {
display: block;
}
.advgb-editor-sidebar-content .components-button.advgb-button {

.advgb-editor-sidebar-content .components-button.advgb-button.is-button {
display: block;
width: 100%;
margin: 10px 0;
padding: 5px;
height: auto;
box-shadow: none;
outline: none;
}
&:focus {

.advgb-editor-sidebar-content .components-button.advgb-button.is-button:focus {
outline: none;
box-shadow: none;
}
}

.advgb-editor-sidebar-content .components-button.advgb-button.is-button.is-default {
background-color: #fff;
color: #000;
}
&.is-secondary {

.advgb-editor-sidebar-content .components-button.advgb-button.is-button.is-primary {
background-color: #2196f3;
border: 1px solid #2196f3;
text-shadow: none;
color: #fff;
}

&.is-primary {

}
}

/*Accordion block styles*/
Expand Down
11 changes: 0 additions & 11 deletions src/assets/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,6 @@ jQuery(document).ready(function ($) {
position: {
my: 'top left',
at: 'bottom bottom'
},
style: {
tip: {
corner: true
},
classes: 'advgb-qtip'
},
show: 'hover',
hide: {
fixed: true,
delay: 10
}
});

Expand Down
2 changes: 1 addition & 1 deletion src/developer_documentation.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p class="devintro" style="text-align: center;">
This documentation will help experienced developers to plug any other service with our plugin. Here are all actions and filters for this plugin, if you need some more, feel free <strong> <a data-link-type="custom" href="https://advancedgutenberg.com/contact/" target="_blank" title="">to contact us.</a></strong> Thanks for using our plugin!
This documentation will help experienced developers to plug any other service with our plugin. Here are all actions and filters for this plugin, if you need some more, feel free <strong> <a data-link-type="custom" href="https://publishpress.com/publishpress-support/" target="_blank" title="">to contact us.</a></strong> Thanks for using our plugin!
</p>

<div class="hook filter">
Expand Down
10 changes: 6 additions & 4 deletions src/incl/advanced-gutenberg-main.php
Original file line number Diff line number Diff line change
Expand Up @@ -1438,10 +1438,12 @@ public function registerStylesScripts()
if (!isset($saved_settings['enable_columns_visual_guide'])
|| (isset($saved_settings['enable_columns_visual_guide']) && $saved_settings['enable_columns_visual_guide'])
) {
wp_add_inline_style(
'dashicons',
'.advgb-editor-col-guide-enable .advgb-columns>.block-editor-inner-blocks>.block-editor-block-list__layout>.wp-block:not(.is-selected)>.advgb-column{border:1px dashed #ddd;}'
);
if($saved_settings['enable_columns_visual_guide'] == '1') {
wp_add_inline_style(
'dashicons',
'.advgb-columns>.block-editor-inner-blocks>.block-editor-block-list__layout>.wp-block:not(.is-selected)>.advgb-column{border:1px dashed #ddd;}'
);
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/incl/view/advanced-gutenberg-main-view.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</div>
<div class="ju-left-panel">
<div class="ju-logo">
<a href="https://advancedgutenberg.com/" target="_blank">
<a href="https://publishpress.com/advanced-gutenberg/" target="_blank">
<img src="<?php echo esc_url(plugins_url('assets/images/logo-white.png', dirname(dirname(__FILE__)))) ?>"
alt="<?php esc_html_e('Advanced Gutenberg logo', 'advanced-gutenberg') ?>">
</a>
Expand Down
2 changes: 1 addition & 1 deletion src/incl/view/advanced-gutenberg-translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<p><?php _e('The previous translation system has been removed. However, you can now translate Advanced Gutenberg into your language using the normal WordPress translation system. You can use the .mo and .po files located in the /wp-content/advanced-gutenberg/plugins/languages/ folder.', 'advanced-gutenberg'); ?></p>
<p><?php echo sprintf(
__('If you have any questions, please send us a message through %1$sour contact page%2$s.', 'advanced-gutenberg'),
'<a href="' . esc_url('https://advancedgutenberg.com/contact/') . '" target="_blank">',
'<a href="' . esc_url('https://publishpress.com/publishpress-support/') . '" target="_blank">',
'</a>'
); ?></p>
</div>
2 changes: 1 addition & 1 deletion src/jufeedback/jufeedback.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Jufeedback
*
* @var string $mailto
*/
public static $mailto = 'help@advancedgutenberg.com';
public static $mailto = 'help@publishpress.com';

/**
* @todo check if Jutranslation is actually being called here
Expand Down
2 changes: 1 addition & 1 deletion src/languages/advanced-gutenberg.pot
Original file line number Diff line number Diff line change
Expand Up @@ -1795,7 +1795,7 @@ msgstr ""

#. Plugin URI of the plugin/theme
#. Author URI of the plugin/theme
msgid "https://advancedgutenberg.com"
msgid "https://publishpress.com/"
msgstr ""

#. Description of the plugin/theme
Expand Down
17 changes: 12 additions & 5 deletions src/readme.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
=== Advanced Gutenberg - Blocks, Permissions, Layouts, Forms and CSS Styles ===
Contributors: JoomUnited, advancedgutenberg
Contributors: publishpress, advancedgutenberg, JoomUnited
Tags: gutenberg, gutenberg blocks, advanced gutenberg, editor, blocks
Requires at least: 5.0
Tested up to: 5.5.1
Stable tag: 2.4.6
Stable tag: 2.4.7
Requires PHP: 5.6
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -58,13 +58,13 @@ Advanced Gutenberg adds the missing blocks and configuration you need to build p

[vimeo https://vimeo.com/264060718]

<a href="https://advancedgutenberg.com/" title="WordPress Advanced Gutenberg" rel="friend">Read the plugin presentation on our website</a>
<a href="https://publishpress.com/advanced-gutenberg/" title="WordPress Advanced Gutenberg" rel="friend">Read the plugin presentation on our website</a>


= Support =

Before leaving a review >> Feel free to ask questions here in the support section, we reply to every question!
We also have a forum on [advancedgutenberg.com](https://advancedgutenberg.com/) for feature requests.
We also have [a support page](https://publishpress.com/publishpress-support/) for feature requests.

== Installation ==

Expand All @@ -90,7 +90,7 @@ We also have a forum on [advancedgutenberg.com](https://advancedgutenberg.com/)
4. You can define a custom color for the new blocks, by default it's a kind of purple color

= Can I get support for the editor use? =
We reply to every question about the editor on the forum here, just ask :) We also have an online documentation here: [https://advancedgutenberg.com/knowledge-base/](https://advancedgutenberg.com/knowledge-base/)
We reply to every question about the editor on the forum here, just ask :) We also have [an online documentation here](https://publishpress.com/knowledge-base/installation/).

= Does Advanced Gutenberg slowing down my website? =
The plugin has almost NO impact on page load for your visitors, it's only loaded during the edition process.
Expand Down Expand Up @@ -127,6 +127,13 @@ The Advanced Gutenberg Custom CSS can be created from the plugin configuration a

== Changelog ==

= 2.4.7 =
* Fix: Global columns visual guide
* Fix: Deprecated isDefault replaced with isSecondary
* Fix: Hidden text in selected button groups on content Gutenberg sidebar
* Fix: Custom class support for Advanced Icon and Info Box blocks
* Fix: Tooltips in configuration pages

= 2.4.6 =
* Fix: Support for nested blocks in 5th level

Expand Down

0 comments on commit 20768cd

Please sign in to comment.