Version Description
Download this release
Release Info
| Developer | Godaddy |
| Plugin | |
| Version | 1.26.1 |
| Comparing to | |
| See all releases | |
Code changes from version 1.26.0 to 1.26.1
- class-coblocks.php +2 -2
- includes/class-coblocks-block-assets.php +1 -5
- includes/class-coblocks-form.php +10 -19
- readme.txt +3 -12
class-coblocks.php
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
* Description: CoBlocks is a suite of professional <strong>page building content blocks</strong> for the WordPress Gutenberg block editor. Our blocks are hyper-focused on empowering makers to build beautifully rich pages in WordPress.
|
| 6 |
* Author: GoDaddy
|
| 7 |
* Author URI: https://www.godaddy.com
|
| 8 |
-
* Version: 1.26.
|
| 9 |
* Text Domain: coblocks
|
| 10 |
* Domain Path: /languages
|
| 11 |
* Tested up to: 5.4
|
|
@@ -26,7 +26,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
| 26 |
exit;
|
| 27 |
}
|
| 28 |
|
| 29 |
-
define( 'COBLOCKS_VERSION', '1.26.
|
| 30 |
define( 'COBLOCKS_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
| 31 |
define( 'COBLOCKS_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
| 32 |
define( 'COBLOCKS_PLUGIN_FILE', __FILE__ );
|
| 5 |
* Description: CoBlocks is a suite of professional <strong>page building content blocks</strong> for the WordPress Gutenberg block editor. Our blocks are hyper-focused on empowering makers to build beautifully rich pages in WordPress.
|
| 6 |
* Author: GoDaddy
|
| 7 |
* Author URI: https://www.godaddy.com
|
| 8 |
+
* Version: 1.26.1
|
| 9 |
* Text Domain: coblocks
|
| 10 |
* Domain Path: /languages
|
| 11 |
* Tested up to: 5.4
|
| 26 |
exit;
|
| 27 |
}
|
| 28 |
|
| 29 |
+
define( 'COBLOCKS_VERSION', '1.26.1' );
|
| 30 |
define( 'COBLOCKS_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
| 31 |
define( 'COBLOCKS_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
| 32 |
define( 'COBLOCKS_PLUGIN_FILE', __FILE__ );
|
includes/class-coblocks-block-assets.php
CHANGED
|
@@ -84,11 +84,7 @@ class CoBlocks_Block_Assets {
|
|
| 84 |
// in the coblocks/* namespace.
|
| 85 |
$wp_post = get_post( $post );
|
| 86 |
if ( $wp_post instanceof WP_Post ) {
|
| 87 |
-
$
|
| 88 |
-
}
|
| 89 |
-
|
| 90 |
-
if ( false !== strpos( $post_content, '<!-- wp:coblocks/' ) ) {
|
| 91 |
-
$has_coblock = true;
|
| 92 |
}
|
| 93 |
}
|
| 94 |
|
| 84 |
// in the coblocks/* namespace.
|
| 85 |
$wp_post = get_post( $post );
|
| 86 |
if ( $wp_post instanceof WP_Post ) {
|
| 87 |
+
$has_coblock = false !== strpos( $wp_post->post_content, '<!-- wp:coblocks/' );
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
}
|
| 89 |
}
|
| 90 |
|
includes/class-coblocks-form.php
CHANGED
|
@@ -192,13 +192,11 @@ class CoBlocks_Form {
|
|
| 192 |
$submitted_hash = filter_input( INPUT_POST, 'form-hash', FILTER_SANITIZE_STRING );
|
| 193 |
|
| 194 |
ob_start();
|
| 195 |
-
|
| 196 |
?>
|
| 197 |
|
| 198 |
<div class="coblocks-form" id="<?php echo esc_attr( $this->form_hash ); ?>">
|
| 199 |
|
| 200 |
<?php
|
| 201 |
-
|
| 202 |
if ( $submitted_hash === $this->form_hash ) {
|
| 203 |
|
| 204 |
$submit_form = $this->process_form_submission( $atts );
|
|
@@ -210,16 +208,21 @@ class CoBlocks_Form {
|
|
| 210 |
print( '</div>' );
|
| 211 |
|
| 212 |
return ob_get_clean();
|
| 213 |
-
|
| 214 |
}
|
| 215 |
}
|
| 216 |
-
|
| 217 |
?>
|
| 218 |
|
| 219 |
<form action="<?php echo esc_url( sprintf( '%1$s#%2$s', set_url_scheme( get_the_permalink() ), $this->form_hash ) ); ?>" method="post">
|
| 220 |
<?php echo do_blocks( $content ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
| 221 |
<input class="coblocks-field verify" type="email" name="coblocks-verify-email" autocomplete="off" placeholder="<?php esc_attr_e( 'Email', 'coblocks' ); ?>" tabindex="-1">
|
| 222 |
<input type="hidden" name="form-hash" value="<?php echo esc_attr( $this->form_hash ); ?>">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 223 |
</form>
|
| 224 |
|
| 225 |
</div>
|
|
@@ -227,7 +230,6 @@ class CoBlocks_Form {
|
|
| 227 |
<?php
|
| 228 |
|
| 229 |
return ob_get_clean();
|
| 230 |
-
|
| 231 |
}
|
| 232 |
|
| 233 |
/**
|
|
@@ -769,42 +771,31 @@ class CoBlocks_Form {
|
|
| 769 |
$atts['className'],
|
| 770 |
$btn_class
|
| 771 |
);
|
| 772 |
-
|
| 773 |
}
|
| 774 |
|
| 775 |
if ( isset( $atts['customBackgroundButtonColor'] ) ) {
|
| 776 |
-
|
| 777 |
$styles[] = "background-color: {$atts['customBackgroundButtonColor']};";
|
| 778 |
-
|
| 779 |
}
|
| 780 |
|
| 781 |
if ( isset( $atts['customTextButtonColor'] ) ) {
|
| 782 |
-
|
| 783 |
$styles[] = "color: {$atts['customTextButtonColor']};";
|
| 784 |
-
|
| 785 |
}
|
| 786 |
|
| 787 |
ob_start();
|
| 788 |
-
|
| 789 |
?>
|
| 790 |
|
| 791 |
<div class="coblocks-form__submit wp-block-button">
|
| 792 |
<button type="submit" class="wp-block-button__link<?php echo esc_attr( $btn_class ); ?>" style="<?php echo esc_attr( implode( ' ', $styles ) ); ?>"><?php echo esc_html( $btn_text ); ?></button>
|
| 793 |
<?php wp_nonce_field( 'coblocks-form-submit', 'form-submit' ); ?>
|
| 794 |
<input type="hidden" name="action" value="coblocks-form-submit">
|
| 795 |
-
|
| 796 |
-
if ( $recaptcha_site_key && $recaptcha_secret_key )
|
| 797 |
-
?>
|
| 798 |
<input type="hidden" class="g-recaptcha-token" name="g-recaptcha-token" />
|
| 799 |
-
|
| 800 |
-
}
|
| 801 |
-
?>
|
| 802 |
</div>
|
| 803 |
|
| 804 |
<?php
|
| 805 |
-
|
| 806 |
return ob_get_clean();
|
| 807 |
-
|
| 808 |
}
|
| 809 |
|
| 810 |
/**
|
| 192 |
$submitted_hash = filter_input( INPUT_POST, 'form-hash', FILTER_SANITIZE_STRING );
|
| 193 |
|
| 194 |
ob_start();
|
|
|
|
| 195 |
?>
|
| 196 |
|
| 197 |
<div class="coblocks-form" id="<?php echo esc_attr( $this->form_hash ); ?>">
|
| 198 |
|
| 199 |
<?php
|
|
|
|
| 200 |
if ( $submitted_hash === $this->form_hash ) {
|
| 201 |
|
| 202 |
$submit_form = $this->process_form_submission( $atts );
|
| 208 |
print( '</div>' );
|
| 209 |
|
| 210 |
return ob_get_clean();
|
|
|
|
| 211 |
}
|
| 212 |
}
|
|
|
|
| 213 |
?>
|
| 214 |
|
| 215 |
<form action="<?php echo esc_url( sprintf( '%1$s#%2$s', set_url_scheme( get_the_permalink() ), $this->form_hash ) ); ?>" method="post">
|
| 216 |
<?php echo do_blocks( $content ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
| 217 |
<input class="coblocks-field verify" type="email" name="coblocks-verify-email" autocomplete="off" placeholder="<?php esc_attr_e( 'Email', 'coblocks' ); ?>" tabindex="-1">
|
| 218 |
<input type="hidden" name="form-hash" value="<?php echo esc_attr( $this->form_hash ); ?>">
|
| 219 |
+
|
| 220 |
+
<?php
|
| 221 |
+
// Output a submit button if it's not found in the block content.
|
| 222 |
+
if ( false === strpos( $content, 'coblocks-form__submit' ) ) :
|
| 223 |
+
echo $this->render_field_submit_button( $atts ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
| 224 |
+
endif;
|
| 225 |
+
?>
|
| 226 |
</form>
|
| 227 |
|
| 228 |
</div>
|
| 230 |
<?php
|
| 231 |
|
| 232 |
return ob_get_clean();
|
|
|
|
| 233 |
}
|
| 234 |
|
| 235 |
/**
|
| 771 |
$atts['className'],
|
| 772 |
$btn_class
|
| 773 |
);
|
|
|
|
| 774 |
}
|
| 775 |
|
| 776 |
if ( isset( $atts['customBackgroundButtonColor'] ) ) {
|
|
|
|
| 777 |
$styles[] = "background-color: {$atts['customBackgroundButtonColor']};";
|
|
|
|
| 778 |
}
|
| 779 |
|
| 780 |
if ( isset( $atts['customTextButtonColor'] ) ) {
|
|
|
|
| 781 |
$styles[] = "color: {$atts['customTextButtonColor']};";
|
|
|
|
| 782 |
}
|
| 783 |
|
| 784 |
ob_start();
|
|
|
|
| 785 |
?>
|
| 786 |
|
| 787 |
<div class="coblocks-form__submit wp-block-button">
|
| 788 |
<button type="submit" class="wp-block-button__link<?php echo esc_attr( $btn_class ); ?>" style="<?php echo esc_attr( implode( ' ', $styles ) ); ?>"><?php echo esc_html( $btn_text ); ?></button>
|
| 789 |
<?php wp_nonce_field( 'coblocks-form-submit', 'form-submit' ); ?>
|
| 790 |
<input type="hidden" name="action" value="coblocks-form-submit">
|
| 791 |
+
|
| 792 |
+
<?php if ( $recaptcha_site_key && $recaptcha_secret_key ) : ?>
|
|
|
|
| 793 |
<input type="hidden" class="g-recaptcha-token" name="g-recaptcha-token" />
|
| 794 |
+
<?php endif; ?>
|
|
|
|
|
|
|
| 795 |
</div>
|
| 796 |
|
| 797 |
<?php
|
|
|
|
| 798 |
return ob_get_clean();
|
|
|
|
| 799 |
}
|
| 800 |
|
| 801 |
/**
|
readme.txt
CHANGED
|
@@ -6,7 +6,7 @@ Tags: page builder, Gutenberg blocks, WordPress blocks, gutenberg, blocks
|
|
| 6 |
Requires at least: 5.0
|
| 7 |
Tested up to: 5.4
|
| 8 |
Requires PHP: 5.6
|
| 9 |
-
Stable tag: 1.26.
|
| 10 |
License: GPL-2.0
|
| 11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 12 |
|
|
@@ -123,15 +123,6 @@ Developers can also apply minor style touch-ups to their themes if necessary. If
|
|
| 123 |
|
| 124 |
== Changelog ==
|
| 125 |
|
| 126 |
-
### Enhancements
|
| 127 |
-
* Allow core/shortcode block in the Pricing Table block [#1465](https://github.com/godaddy-wordpress/coblocks/pull/1465)
|
| 128 |
-
* Use columns/gutter utilities on the Pricing Table block [#1440](https://github.com/godaddy-wordpress/coblocks/pull/1440)
|
| 129 |
-
* Only load front end CSS when it is needed [#1455](https://github.com/godaddy-wordpress/coblocks/pull/1455)
|
| 130 |
-
|
| 131 |
### Bug Fixes
|
| 132 |
-
*
|
| 133 |
-
*
|
| 134 |
-
|
| 135 |
-
### Misc
|
| 136 |
-
* Add form block e2e test to confirm emails are being sent [#1468](https://github.com/godaddy-wordpress/coblocks/pull/1468)
|
| 137 |
-
* Improve keywords for icons [#1448](https://github.com/godaddy-wordpress/coblocks/pull/1448)
|
| 6 |
Requires at least: 5.0
|
| 7 |
Tested up to: 5.4
|
| 8 |
Requires PHP: 5.6
|
| 9 |
+
Stable tag: 1.26.1
|
| 10 |
License: GPL-2.0
|
| 11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 12 |
|
| 123 |
|
| 124 |
== Changelog ==
|
| 125 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 126 |
### Bug Fixes
|
| 127 |
+
* Render a submit button if not found in the block content [#1479](https://github.com/godaddy-wordpress/coblocks/pull/1479)
|
| 128 |
+
* Remove a condition where a variable may not be defined [#1477](https://github.com/godaddy-wordpress/coblocks/pull/1477)
|
|
|
|
|
|
|
|
|
|
|
|
