From 4bf0e762b566e873080f1f7c7560bbbf437053f0 Mon Sep 17 00:00:00 2001 From: Patrick Heina Date: Wed, 28 Sep 2022 15:24:35 +0200 Subject: [PATCH 1/2] only require form-block related files if the form-block is enabled, to avoid the creation of the PHPSESSID-cookie (because of GPRD-things...) --- src/gutenberg/index.php | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/gutenberg/index.php b/src/gutenberg/index.php index 084db2bb..fc55906d 100644 --- a/src/gutenberg/index.php +++ b/src/gutenberg/index.php @@ -14,19 +14,23 @@ require_once ghostkit()->plugin_path . 'gutenberg/blocks/twitter/block.php'; require_once ghostkit()->plugin_path . 'gutenberg/blocks/table-of-contents/block.php'; -require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/block.php'; -require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/fields/text/block.php'; -require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/fields/email/block.php'; -require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/fields/name/block.php'; -require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/fields/url/block.php'; -require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/fields/phone/block.php'; -require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/fields/number/block.php'; -require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/fields/date/block.php'; -require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/fields/textarea/block.php'; -require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/fields/select/block.php'; -require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/fields/checkbox/block.php'; -require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/fields/radio/block.php'; -require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/fields/hidden/block.php'; + + +if ( ! $key_exists( 'ghostkit/form', get_option( 'ghostkit_disabled_blocks', array() ) ) ) { + require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/block.php'; + require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/fields/text/block.php'; + require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/fields/email/block.php'; + require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/fields/name/block.php'; + require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/fields/url/block.php'; + require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/fields/phone/block.php'; + require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/fields/number/block.php'; + require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/fields/date/block.php'; + require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/fields/textarea/block.php'; + require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/fields/select/block.php'; + require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/fields/checkbox/block.php'; + require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/fields/radio/block.php'; + require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/fields/hidden/block.php'; +} require_once ghostkit()->plugin_path . 'gutenberg/plugins/customizer/index.php'; require_once ghostkit()->plugin_path . 'gutenberg/plugins/custom-code/index.php'; From 8d081e07cb50f01b99c144982997ac728407af86 Mon Sep 17 00:00:00 2001 From: Patrick Heina <1517637+pand0r@users.noreply.github.com> Date: Fri, 21 Oct 2022 10:17:26 +0200 Subject: [PATCH 2/2] fixed typo --- src/gutenberg/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gutenberg/index.php b/src/gutenberg/index.php index fc55906d..5dcdea9b 100644 --- a/src/gutenberg/index.php +++ b/src/gutenberg/index.php @@ -16,7 +16,7 @@ -if ( ! $key_exists( 'ghostkit/form', get_option( 'ghostkit_disabled_blocks', array() ) ) ) { +if ( ! key_exists( 'ghostkit/form', get_option( 'ghostkit_disabled_blocks', array() ) ) ) { require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/block.php'; require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/fields/text/block.php'; require_once ghostkit()->plugin_path . 'gutenberg/blocks/form/fields/email/block.php';