Skip to content

Commit

Permalink
SD Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Stiofan committed Jul 16, 2024
1 parent f94a7e2 commit 9231cf6
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 67 deletions.
3 changes: 2 additions & 1 deletion vendor/ayecode/wp-super-duper/change-log.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
= 1.2.3 - 2024-07-16 =
= 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
Expand Down
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.3' );
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.3",
"version_normalized": "1.2.3.0",
"version": "1.2.4",
"version_normalized": "1.2.4.0",
"source": {
"type": "git",
"url": "https://github.com/AyeCode/wp-super-duper.git",
"reference": "5df08670f6dbc1848e33794d8a3db796e4f0783c"
"reference": "2fc373bedb2fcc853e8115de9e82b5c5c008d3bf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/AyeCode/wp-super-duper/zipball/5df08670f6dbc1848e33794d8a3db796e4f0783c",
"reference": "5df08670f6dbc1848e33794d8a3db796e4f0783c",
"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-16T10:46:26+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.3"
"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' => 'uswerwp/userswp',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'bdbfc47d3cdf433bd60e9ba11e65f7e125d9b4b4',
'reference' => 'f94a7e2deba1e2a48f726c56d63da1a6442e60e2',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down Expand Up @@ -47,9 +47,9 @@
'dev_requirement' => false,
),
'ayecode/wp-super-duper' => array(
'pretty_version' => '1.2.3',
'version' => '1.2.3.0',
'reference' => '5df08670f6dbc1848e33794d8a3db796e4f0783c',
'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 Expand Up @@ -79,7 +79,7 @@
'uswerwp/userswp' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'bdbfc47d3cdf433bd60e9ba11e65f7e125d9b4b4',
'reference' => 'f94a7e2deba1e2a48f726c56d63da1a6442e60e2',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down

0 comments on commit 9231cf6

Please sign in to comment.