Skip to content

Commit

Permalink
Merge pull request #643 from publishpress/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
htmgarcia authored Jul 7, 2021
2 parents 27d9f5a + 9a05df9 commit e7b1553
Show file tree
Hide file tree
Showing 25 changed files with 11,653 additions and 10,469 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
bundled/
vendor/
node_modules/
src/assets/blocks/blocks.js.map
src/assets/blocks/frontend.js.map
src/assets/blocks/*.js.map
.DS_Store*
4 changes: 2 additions & 2 deletions src/advanced-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: PublishPress Blocks
* Plugin URI: https://publishpress.com/blocks/
* Description: PublishPress Blocks has everything you need to build professional websites with the Gutenberg editor.
* Version: 2.8.1
* Version: 2.8.2
* Tested up to: 5.7.2
* Author: PublishPress
* Author URI: https://publishpress.com/
Expand Down Expand Up @@ -39,7 +39,7 @@
defined('ABSPATH') || die;

if (! defined('ADVANCED_GUTENBERG_VERSION')) {
define('ADVANCED_GUTENBERG_VERSION', '2.8.1');
define('ADVANCED_GUTENBERG_VERSION', '2.8.2');
}

if (! defined('ADVANCED_GUTENBERG_PLUGIN')) {
Expand Down
10 changes: 4 additions & 6 deletions src/assets/blocks/advtabs/block.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,9 @@
} else {
advgbTabsUniqueIDs.push( this.props.attributes.uniqueID );
}
if (!this.props.attributes.pid) {
this.props.setAttributes( {
pid: `advgb-tabs-${this.props.clientId}`,
} );
}
this.props.setAttributes( {
pid: `advgb-tabs-${this.props.clientId}`,
} );
this.updateTabHeaders();
this.props.resetOrder();
}
Expand Down Expand Up @@ -781,4 +779,4 @@
}
]
} );
})( wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components, wp.compose );
})( wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components, wp.compose );
37 changes: 25 additions & 12 deletions src/assets/blocks/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -12130,11 +12130,9 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
} else {
advgbTabsUniqueIDs.push(this.props.attributes.uniqueID);
}
if (!this.props.attributes.pid) {
this.props.setAttributes({
pid: "advgb-tabs-" + this.props.clientId
});
}
this.props.setAttributes({
pid: "advgb-tabs-" + this.props.clientId
});
this.updateTabHeaders();
this.props.resetOrder();
}
Expand Down Expand Up @@ -14100,7 +14098,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
select = _wp$data.select;


var COLUMNS_LAYOUTS = [{ columns: 1, layout: '100', icon: '100', title: __('One', 'advanced-gutenberg') }, { columns: 2, layout: '12-12', icon: '12-12', title: __('Two: 1/2 - 1/2', 'advanced-gutenberg') }, { columns: 2, layout: '23-13', icon: '23-13', title: __('Two: 2/3 - 1/3', 'advanced-gutenberg') }, { columns: 2, layout: '13-23', icon: '13-23', title: __('Two: 1/3 - 2/3', 'advanced-gutenberg') }, { columns: 2, layout: '14-34', icon: '14-34', title: __('Two: 1/4 - 3/4', 'advanced-gutenberg') }, { columns: 2, layout: '34-14', icon: '34-14', title: __('Two: 3/4 - 1/4', 'advanced-gutenberg') }, { columns: 2, layout: '15-45', icon: '15-45', title: __('Two: 1/5 - 4/5', 'advanced-gutenberg') }, { columns: 2, layout: '45-15', icon: '45-15', title: __('Two: 4/5 - 1/5', 'advanced-gutenberg') }, { columns: 3, layout: '13-13-13', icon: '13-13-13', title: __('Three: 1/3 - 1/3 - 1/3', 'advanced-gutenberg') }, { columns: 3, layout: '12-14-14', icon: '12-14-14', title: __('Three: 1/2 - 1/4 - 1/4', 'advanced-gutenberg') }, { columns: 3, layout: '14-14-12', icon: '14-14-12', title: __('Three: 1/4 - 1/4 - 1/2', 'advanced-gutenberg') }, { columns: 3, layout: '14-12-14', icon: '14-12-14', title: __('Three: 1/4 - 1/2 - 1/4', 'advanced-gutenberg') }, { columns: 3, layout: '15-35-15', icon: '15-35-15', title: __('Three: 1/5 - 3/5 - 1/5', 'advanced-gutenberg') }, { columns: 3, layout: '35-15-15', icon: '35-15-15', title: __('Three: 3/5 - 1/5 - 1/5', 'advanced-gutenberg') }, { columns: 3, layout: '15-15-35', icon: '15-15-35', title: __('Three: 1/5 - 1/5 - 3/5', 'advanced-gutenberg') }, { columns: 3, layout: '16-46-16', icon: '16-46-16', title: __('Three: 1/6 - 4/6 - 1/6', 'advanced-gutenberg') }, { columns: 4, layout: '14-14-14-14', icon: '14-14-14-14', title: __('Four: 1/4 - 1/4 - 1/4 - 1/4', 'advanced-gutenberg') }, { columns: 4, layout: '36-16-16-16', icon: '36-16-16-16', title: __('Four: 3/6 - 1/6 - 1/6 - 1/6', 'advanced-gutenberg') }, { columns: 4, layout: '16-16-16-36', icon: '16-16-16-36', title: __('Four: 1/6 - 1/6 - 1/6 - 3/6', 'advanced-gutenberg') }, { columns: 4, layout: '15-15-15-25', icon: '15-15-15-25', title: __('Four: 1/5 - 1/5 - 1/5 - 2/5', 'advanced-gutenberg') }, { columns: 4, layout: '25-15-15-15', icon: '25-15-15-15', title: __('Four: 2/5 - 1/5 - 1/5 - 1/5', 'advanced-gutenberg') }, { columns: 5, layout: 'five', icon: '15-15-15-15-15', title: __('Five', 'advanced-gutenberg') }, { columns: 6, layout: 'six', icon: '16-16-16-16-16-16', title: __('Six', 'advanced-gutenberg') }];
var COLUMNS_LAYOUTS = [{ columns: 1, layout: '100', icon: '100', title: __('One column', 'advanced-gutenberg'), description: __('100', 'advanced-gutenberg') }, { columns: 2, layout: '12-12', icon: '12-12', title: __('Two columns; equal split', 'advanced-gutenberg'), description: __('50 / 50', 'advanced-gutenberg') }, { columns: 2, layout: '23-13', icon: '23-13', title: __('Two columns; two-thirds, one-third split', 'advanced-gutenberg'), description: __('66 / 33', 'advanced-gutenberg') }, { columns: 2, layout: '13-23', icon: '13-23', title: __('Two columns; one-third, two-thirds split', 'advanced-gutenberg'), description: __('33 / 66', 'advanced-gutenberg') }, { columns: 2, layout: '14-34', icon: '14-34', title: __('Two columns; one-quarter, three-quarters split', 'advanced-gutenberg'), description: __('25 / 75', 'advanced-gutenberg') }, { columns: 2, layout: '34-14', icon: '34-14', title: __('Two columns; three-quarters, one-quarter split', 'advanced-gutenberg'), description: __('75 / 25', 'advanced-gutenberg') }, { columns: 2, layout: '15-45', icon: '15-45', title: __('Two columns; one-fifth, four-fifths split', 'advanced-gutenberg'), description: __('20 / 80', 'advanced-gutenberg') }, { columns: 2, layout: '45-15', icon: '45-15', title: __('Two columns; four-fifths, one-fifth split', 'advanced-gutenberg'), description: __('80 / 20', 'advanced-gutenberg') }, { columns: 3, layout: '13-13-13', icon: '13-13-13', title: __('Three columns; equal split', 'advanced-gutenberg'), description: __('33 / 33 / 33', 'advanced-gutenberg') }, { columns: 3, layout: '12-14-14', icon: '12-14-14', title: __('Three columns; wider one-half left column', 'advanced-gutenberg'), description: __('50 / 25 / 25', 'advanced-gutenberg') }, { columns: 3, layout: '14-14-12', icon: '14-14-12', title: __('Three columns; wider one-half right column', 'advanced-gutenberg'), description: __('25 / 25 / 50', 'advanced-gutenberg') }, { columns: 3, layout: '14-12-14', icon: '14-12-14', title: __('Three columns; wider one-half center column', 'advanced-gutenberg'), description: __('25 / 50 / 25', 'advanced-gutenberg') }, { columns: 3, layout: '15-35-15', icon: '15-35-15', title: __('Three columns; wider three-fifths center column', 'advanced-gutenberg'), description: __('20 / 60 / 20', 'advanced-gutenberg') }, { columns: 3, layout: '35-15-15', icon: '35-15-15', title: __('Three columns; wider three-fifths left column', 'advanced-gutenberg'), description: __('60 / 20 / 20', 'advanced-gutenberg') }, { columns: 3, layout: '15-15-35', icon: '15-15-35', title: __('Three columns; wider three-fifths right column', 'advanced-gutenberg'), description: __('20 / 20 / 60', 'advanced-gutenberg') }, { columns: 3, layout: '16-46-16', icon: '16-46-16', title: __('Three columns; wider four-sixths center column', 'advanced-gutenberg'), description: __('16.6 / 66.6 / 16.6', 'advanced-gutenberg') }, { columns: 4, layout: '14-14-14-14', icon: '14-14-14-14', title: __('Four columns; equal split', 'advanced-gutenberg'), description: __('25 / 25 / 25 / 25', 'advanced-gutenberg') }, { columns: 4, layout: '36-16-16-16', icon: '36-16-16-16', title: __('Four columns; wider one-half left column', 'advanced-gutenberg'), description: __('50 / 16.6 / 16.6 / 16.6', 'advanced-gutenberg') }, { columns: 4, layout: '16-16-16-36', icon: '16-16-16-36', title: __('Four columns; wider one-half right column', 'advanced-gutenberg'), description: __('16.6 / 16.6 / 16.6 / 50', 'advanced-gutenberg') }, { columns: 4, layout: '15-15-15-25', icon: '15-15-15-25', title: __('Four columns; wider two-fifths right column', 'advanced-gutenberg'), description: __('20 / 20 / 20 / 40', 'advanced-gutenberg') }, { columns: 4, layout: '25-15-15-15', icon: '25-15-15-15', title: __('Four columns; wider two-fifths left column', 'advanced-gutenberg'), description: __('40 / 20 / 20 / 20', 'advanced-gutenberg') }, { columns: 5, layout: 'five', icon: '15-15-15-15-15', title: __('Five columns; equal split', 'advanced-gutenberg'), description: __('20 / 20 / 20 / 20 / 20', 'advanced-gutenberg') }, { columns: 6, layout: 'six', icon: '16-16-16-16-16-16', title: __('Six columns; equal split', 'advanced-gutenberg'), description: __('16.6 / 16.6 / 16.6 / 16.6 / 16.6 / 16.6', 'advanced-gutenberg') }];
var COLUMNS_LAYOUTS_RESPONSIVE = [{ columns: 3, layout: '1-12-12', icon: '100-12-12', title: __('Three: 100 - 1/2 - 1/2', 'advanced-gutenberg') }, { columns: 3, layout: '12-12-1', icon: '12-12-100', title: __('Three: 1/2 - 1/2 - 100', 'advanced-gutenberg') }, { columns: 4, layout: '12x4', icon: '12-12-12-12', title: __('Four: Two Columns', 'advanced-gutenberg') }, { columns: 6, layout: '12x6', icon: '12-12-12-12', title: __('Six: Two Columns', 'advanced-gutenberg') }, { columns: 6, layout: '13x6', icon: '13-13-13-13-13-13', title: __('Six: Three Columns', 'advanced-gutenberg') }];
var COLUMNS_LAYOUTS_STACKED = {
columns: 1, layout: 'stacked', icon: 'stacked', title: __('Stacked', 'advanced-gutenberg')
Expand Down Expand Up @@ -14286,7 +14284,12 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
},
React.createElement('img', { src: advgbBlocks.pluginUrl + '/assets/blocks/columns/icons/' + layout.icon + '.png',
alt: layout.layout
})
}),
React.createElement(
'div',
{ className: 'advgb-columns-layout-description' },
layout.description
)
)
);
})
Expand Down Expand Up @@ -17024,7 +17027,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
var createHigherOrderComponent = wpCompose.createHigherOrderComponent;


var SUPPORTED_BLOCKS = ['core/paragraph', 'core/heading', 'core/list', 'core/code', 'core/preformatted', 'core/table', 'core/columns', 'core/column', 'core/group'];
var SUPPORTED_BLOCKS = ['core/paragraph', 'core/heading', 'core/list', 'core/code', 'core/preformatted', 'core/table', 'core/columns', 'core/column', 'core/group', 'core/image'];

// Register custom styles to blocks attributes
addFilter('blocks.registerBlockType', 'advgb/registerCustomStyleClass', function (settings) {
Expand Down Expand Up @@ -23849,7 +23852,8 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
sliderAutoplay = attributes.sliderAutoplay,
linkCustomTax = attributes.linkCustomTax,
showCustomTaxList = attributes.showCustomTaxList,
imagePosition = attributes.imagePosition;
imagePosition = attributes.imagePosition,
onlyFromCurrentUser = attributes.onlyFromCurrentUser;


var recentPosts = this.props.recentPosts;
Expand Down Expand Up @@ -24102,7 +24106,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
label: __('Show content with these ', 'advanced-gutenberg') + decodeEntities('' + tax.name)
});
}),
React.createElement(_queryControls.AuthorSelect, {
!onlyFromCurrentUser && React.createElement(_queryControls.AuthorSelect, {
key: 'query-controls-author-select',
authorList: authorList,
label: __('Author', 'advanced-gutenberg'),
Expand All @@ -24112,6 +24116,14 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
return setAttributes({ author: value });
}
}),
React.createElement(ToggleControl, {
label: __('Show only posts from current user', 'advanced-gutenberg'),
help: __('When an user is logged in, his posts will be shown only.', 'advanced-gutenberg'),
checked: onlyFromCurrentUser,
onChange: function onChange() {
return setAttributes({ onlyFromCurrentUser: !onlyFromCurrentUser });
}
}),
isInPost && postType === 'post' && React.createElement(ToggleControl, {
label: __('Exclude current post', 'advanced-gutenberg'),
help: __('If this post is listed in the block, you can exclude it.', 'advanced-gutenberg'),
Expand Down Expand Up @@ -25021,7 +25033,8 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
excludeIds = _props$attributes3.excludeIds,
author = _props$attributes3.author,
taxonomies = _props$attributes3.taxonomies,
taxIds = _props$attributes3.taxIds;
taxIds = _props$attributes3.taxIds,
onlyFromCurrentUser = _props$attributes3.onlyFromCurrentUser;


var catIds = categories && categories.length > 0 ? categories.map(function (cat) {
Expand All @@ -25037,7 +25050,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
per_page: numberOfPosts,
token: myToken,
exclude: excludeCurrentPost ? excludeIds ? union(excludeIds, [postId]) : postId : excludeIds,
author: author
author: onlyFromCurrentUser ? wp.data.select('core').getCurrentUser().id : author
}, function (value) {
return !isUndefined(value) && !(isArray(value) && (isNull(value) || value.length === 0));
});
Expand Down
Loading

0 comments on commit e7b1553

Please sign in to comment.