Skip to content

Commit

Permalink
0.1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
Stiofan committed Jul 16, 2024
1 parent b2e15f2 commit 61bb63e
Show file tree
Hide file tree
Showing 7 changed files with 114 additions and 92 deletions.
4 changes: 2 additions & 2 deletions blockstrap-page-builder-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Plugin Name: BlockStrap Page Builder Blocks
* Plugin URI: https://ayecode.io/
* Description: BlockStrap - A FSE page builder for WordPress
* Version: 0.1.20
* Version: 0.1.21
* Author: AyeCode
* Author URI: https://ayecode.io
* Text Domain: blockstrap-page-builder-blocks
Expand All @@ -21,7 +21,7 @@
*/


define( 'BLOCKSTRAP_BLOCKS_VERSION', '0.1.20' );
define( 'BLOCKSTRAP_BLOCKS_VERSION', '0.1.21' );

/**
* The BlockStrap Class
Expand Down
4 changes: 2 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://ayecode.io
Tags: page builder, bootstrap, blocks, builder, design
Requires at least: 6.0
Tested up to: 6.6
Stable tag: 0.1.20
Stable tag: 0.1.21
Requires PHP: 7.2
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Expand Down Expand Up @@ -176,7 +176,7 @@ Automatic updates should work seamlessly. To avoid unforeseen problems, we alway

== Changelog ==

= 0.1.20 - 2024-07-16 =
= 0.1.21 - 2024-07-16 =
* BS Container has `undefined` class if style ID not set - FIXED
* JS error in rating block breaks modal functionality - FIXED
* Changes to show GD post fallback images on GD post page - CHANGED
Expand Down
9 changes: 8 additions & 1 deletion vendor/ayecode/wp-super-duper/change-log.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
= 1.2.2 - 2024-07-12 =
* Blocks with `block-save-return` set should not have a sd_shortcode argument - FIXED

= 1.2.4 - 2024-07-16 =
* Some blocks not being wrapped inside the block wrapper - FIXED
* Issue with blocks with no arguments not adding shortcode argument - FIXED

= 1.2.2 - 2024-07-12 =
* Blocks with `block-save-return` set should not have a sd_shortcode argument - FIXED

= 1.2.1 - 2024-07-10 =
* `html` argument not wrapped correctly in shortcode with new system for blocks - FIXED
* Hide advanced border options when border color selected to none - FIXED
Expand Down Expand Up @@ -246,4 +253,4 @@
* @since 1.0.15 `group` setting option added to be able to group settings - ADDED
* @since 1.0.15 `block-supports` options array now supported - ADDED
* @since 1.0.15 `block-icon` now supports Font Awesome class - ADDED
* @since 1.0.15 Fusion builder (Avada) elements automatically created - ADDED
* @since 1.0.15 Fusion builder (Avada) elements automatically created - ADDED
55 changes: 34 additions & 21 deletions vendor/ayecode/wp-super-duper/sd-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3703,27 +3703,40 @@ function sd_gd_field_rule_search( $search, $post_type, $rule, $field = array(),
}


/**
* Add the shortcodes to the block content if sett as an attribute.
*
* We have moved the shortcodes from the block content to a block argument to help prevent broken blocks.
*
* @param $block_content
* @param $parsed_block
* @param $thiss
* @return mixed|string
*/
function blockstrap_blocks_render_blocks($block_content, $parsed_block, $thiss ){

// Check if ita a nested block that needs to be wrapped
if(! empty($parsed_block['attrs']['sd_shortcode_close'])){
$content = isset($parsed_block['attrs']['html']) ? $parsed_block['attrs']['html'] : $block_content;
$block_content = $parsed_block['attrs']['sd_shortcode'].$content.$parsed_block['attrs']['sd_shortcode_close'];
}elseif(! empty($parsed_block['attrs']['sd_shortcode'])){
// Add the shortcode if its not a wrapped block
$block_content .= $parsed_block['attrs']['sd_shortcode'];
if(!function_exists('sd_blocks_render_blocks')){
/**
* Add the shortcodes to the block content if set as an attribute.
*
* We have moved the shortcodes from the block content to a block argument to help prevent broken blocks.
*
* @param $block_content
* @param $parsed_block
* @param $thiss
* @return mixed|string
*/
function sd_blocks_render_blocks($block_content, $parsed_block, $thiss ){

// Check if ita a nested block that needs to be wrapped
if(! empty($parsed_block['attrs']['sd_shortcode_close'])){
$content = isset($parsed_block['attrs']['html']) ? $parsed_block['attrs']['html'] : $block_content;
$block_content = $parsed_block['attrs']['sd_shortcode'].$content.$parsed_block['attrs']['sd_shortcode_close'];
}elseif(! empty($parsed_block['attrs']['sd_shortcode'])){
$has_warp = false;
if($block_content && strpos(trim($block_content), '<div class="wp-block-') === 0 ){
$parts = explode('></', $block_content);
if(count($parts) === 2){
$block_content = $parts[0].'>'.$parsed_block['attrs']['sd_shortcode'].'</'.$parts[1];
$has_warp = true;
}
}
if (!$has_warp) {
// Add the shortcode if its not a wrapped block
$block_content .= $parsed_block['attrs']['sd_shortcode'];
}
}
return $block_content;
}
return $block_content;
}
add_filter('render_block', 'blockstrap_blocks_render_blocks',10,3);

add_filter('render_block', 'sd_blocks_render_blocks',10,3);

110 changes: 56 additions & 54 deletions vendor/ayecode/wp-super-duper/wp-super-duper.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

if ( ! class_exists( 'WP_Super_Duper' ) ) {

define( 'SUPER_DUPER_VER', '1.2.2' );
define( 'SUPER_DUPER_VER', '1.2.4' );

/**
* A Class to be able to create a Widget, Shortcode or Block to be able to output content for WordPress.
Expand Down Expand Up @@ -2570,7 +2570,7 @@ function sd_get_class_build_keys(){
echo " html: false";
echo "},";*/

if ( ! empty( $this->arguments ) ) {

echo "attributes : {";

if ( $show_advanced ) {
Expand All @@ -2589,66 +2589,68 @@ function sd_get_class_build_keys(){
}


if ( ! empty( $this->arguments ) ) {

foreach ( $this->arguments as $key => $args ) {
foreach ( $this->arguments as $key => $args ) {

if( $args['type'] == 'image' || $args['type'] == 'images' ){
$img_drag_drop = true;
}
if( $args['type'] == 'image' || $args['type'] == 'images' ){
$img_drag_drop = true;
}

// set if we should show alignment
if ( $key == 'alignment' ) {
$show_alignment = true;
}
// set if we should show alignment
if ( $key == 'alignment' ) {
$show_alignment = true;
}

$extra = '';
$extra = '';

if ( $args['type'] == 'notice' || $args['type'] == 'tab' ) {
continue;
}
elseif ( $args['type'] == 'checkbox' ) {
$type = 'boolean';
$default = isset( $args['default'] ) && $args['default'] ? 'true' : 'false';
} elseif ( $args['type'] == 'number' ) {
$type = 'number';
$default = isset( $args['default'] ) ? "'" . $args['default'] . "'" : "''";
} elseif ( $args['type'] == 'select' && ! empty( $args['multiple'] ) ) {
$type = 'array';
if ( isset( $args['default'] ) && is_array( $args['default'] ) ) {
$default = ! empty( $args['default'] ) ? "['" . implode( "','", $args['default'] ) . "']" : "[]";
} else {
$default = isset( $args['default'] ) ? "'" . $args['default'] . "'" : "''";
if ( $args['type'] == 'notice' || $args['type'] == 'tab' ) {
continue;
}
} elseif ( $args['type'] == 'tagselect' ) {
$type = 'array';
$default = isset( $args['default'] ) ? "'" . $args['default'] . "'" : "''";
} elseif ( $args['type'] == 'multiselect' ) {
$type = 'array';
$default = isset( $args['default'] ) ? "'" . $args['default'] . "'" : "''";
} elseif ( $args['type'] == 'image_xy' ) {
$type = 'object';
$default = isset( $args['default'] ) ? "'" . $args['default'] . "'" : "''";
} elseif ( $args['type'] == 'image' ) {
$type = 'string';
$default = isset( $args['default'] ) ? "'" . $args['default'] . "'" : "''";

// add a field for ID
// echo $key . "_id : {";
// echo "type : 'number',";
// echo "},";
// echo $key . "_xy : {";
// echo "type : 'object',";
// echo "},";
elseif ( $args['type'] == 'checkbox' ) {
$type = 'boolean';
$default = isset( $args['default'] ) && $args['default'] ? 'true' : 'false';
} elseif ( $args['type'] == 'number' ) {
$type = 'number';
$default = isset( $args['default'] ) ? "'" . $args['default'] . "'" : "''";
} elseif ( $args['type'] == 'select' && ! empty( $args['multiple'] ) ) {
$type = 'array';
if ( isset( $args['default'] ) && is_array( $args['default'] ) ) {
$default = ! empty( $args['default'] ) ? "['" . implode( "','", $args['default'] ) . "']" : "[]";
} else {
$default = isset( $args['default'] ) ? "'" . $args['default'] . "'" : "''";
}
} elseif ( $args['type'] == 'tagselect' ) {
$type = 'array';
$default = isset( $args['default'] ) ? "'" . $args['default'] . "'" : "''";
} elseif ( $args['type'] == 'multiselect' ) {
$type = 'array';
$default = isset( $args['default'] ) ? "'" . $args['default'] . "'" : "''";
} elseif ( $args['type'] == 'image_xy' ) {
$type = 'object';
$default = isset( $args['default'] ) ? "'" . $args['default'] . "'" : "''";
} elseif ( $args['type'] == 'image' ) {
$type = 'string';
$default = isset( $args['default'] ) ? "'" . $args['default'] . "'" : "''";

} else {
$type = !empty($args['hidden_type']) ? esc_attr($args['hidden_type']) : 'string';
$default = isset( $args['default'] ) ? "'" . $args['default'] . "'" : "''";
// add a field for ID
// echo $key . "_id : {";
// echo "type : 'number',";
// echo "},";
// echo $key . "_xy : {";
// echo "type : 'object',";
// echo "},";

} else {
$type = !empty($args['hidden_type']) ? esc_attr($args['hidden_type']) : 'string';
$default = isset( $args['default'] ) ? "'" . $args['default'] . "'" : "''";

}
echo $key . " : {";
echo "type : '$type',";
echo "default : $default,";
echo "},";
}
echo $key . " : {";
echo "type : '$type',";
echo "default : $default,";
echo "},";
}

echo "content : {type : 'string',default: 'Please select the attributes in the block settings'},";
Expand All @@ -2662,7 +2664,7 @@ function sd_get_class_build_keys(){

echo "},";

}


?>

Expand Down
14 changes: 7 additions & 7 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,24 +206,24 @@
},
{
"name": "ayecode/wp-super-duper",
"version": "1.2.2",
"version_normalized": "1.2.2.0",
"version": "1.2.4",
"version_normalized": "1.2.4.0",
"source": {
"type": "git",
"url": "https://github.com/AyeCode/wp-super-duper.git",
"reference": "b4ac96ae438ac15b37c88ff982af84ba37c4e905"
"reference": "2fc373bedb2fcc853e8115de9e82b5c5c008d3bf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/AyeCode/wp-super-duper/zipball/b4ac96ae438ac15b37c88ff982af84ba37c4e905",
"reference": "b4ac96ae438ac15b37c88ff982af84ba37c4e905",
"url": "https://api.github.com/repos/AyeCode/wp-super-duper/zipball/2fc373bedb2fcc853e8115de9e82b5c5c008d3bf",
"reference": "2fc373bedb2fcc853e8115de9e82b5c5c008d3bf",
"shasum": ""
},
"require": {
"composer/installers": "~1.0",
"php": ">=5.4.0"
},
"time": "2024-07-12T10:42:17+00:00",
"time": "2024-07-16T12:53:15+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand Down Expand Up @@ -255,7 +255,7 @@
],
"support": {
"issues": "https://github.com/AyeCode/wp-super-duper/issues",
"source": "https://github.com/AyeCode/wp-super-duper/tree/1.2.2"
"source": "https://github.com/AyeCode/wp-super-duper/tree/1.2.4"
},
"install-path": "../ayecode/wp-super-duper"
},
Expand Down
10 changes: 5 additions & 5 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => 'ayecode/blockstrap-page-builder-blocks',
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => 'b51bc80c58556e29a9ce9a18d3b21a90d9ac1828',
'reference' => 'b2e15f271afffa4363b4f4d1572e27a7b1d83791',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand All @@ -22,7 +22,7 @@
'ayecode/blockstrap-page-builder-blocks' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => 'b51bc80c58556e29a9ce9a18d3b21a90d9ac1828',
'reference' => 'b2e15f271afffa4363b4f4d1572e27a7b1d83791',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down Expand Up @@ -56,9 +56,9 @@
'dev_requirement' => false,
),
'ayecode/wp-super-duper' => array(
'pretty_version' => '1.2.2',
'version' => '1.2.2.0',
'reference' => 'b4ac96ae438ac15b37c88ff982af84ba37c4e905',
'pretty_version' => '1.2.4',
'version' => '1.2.4.0',
'reference' => '2fc373bedb2fcc853e8115de9e82b5c5c008d3bf',
'type' => 'library',
'install_path' => __DIR__ . '/../ayecode/wp-super-duper',
'aliases' => array(),
Expand Down

0 comments on commit 61bb63e

Please sign in to comment.