diff --git a/packages/block-library/src/form-input/index.php b/packages/block-library/src/form-input/index.php index b4a2f6fb2e548..f905c2bc6e19f 100644 --- a/packages/block-library/src/form-input/index.php +++ b/packages/block-library/src/form-input/index.php @@ -32,8 +32,6 @@ function render_block_core_form_input( $attributes, $content ) { * Registers the `core/form-input` block on server. */ function register_block_core_form_input() { - // Refactoring required: this function must be guarded as it is available only in Gutenberg, and not in Core. - // phpcs:ignore Gutenberg.CodeAnalysis.ForbiddenFunctionsAndClasses.ForbiddenFunctionCall if ( ! gutenberg_is_experiment_enabled( 'gutenberg-form-blocks' ) ) { return; } diff --git a/packages/block-library/src/form-submission-notification/index.php b/packages/block-library/src/form-submission-notification/index.php index 4d07e3b92ef00..0a57866f37edf 100644 --- a/packages/block-library/src/form-submission-notification/index.php +++ b/packages/block-library/src/form-submission-notification/index.php @@ -35,8 +35,6 @@ function render_block_core_form_submission_notification( $attributes, $content ) * Registers the `core/form-submission-notification` block on server. */ function register_block_core_form_submission_notification() { - // Refactoring required: this function must be guarded as it is available only in Gutenberg, and not in Core. - // phpcs:ignore Gutenberg.CodeAnalysis.ForbiddenFunctionsAndClasses.ForbiddenFunctionCall if ( ! gutenberg_is_experiment_enabled( 'gutenberg-form-blocks' ) ) { return; } diff --git a/packages/block-library/src/form/index.php b/packages/block-library/src/form/index.php index 5eb4b75224d97..8c63594671ca6 100644 --- a/packages/block-library/src/form/index.php +++ b/packages/block-library/src/form/index.php @@ -46,8 +46,6 @@ function render_block_core_form( $attributes, $content ) { * Additional data to add to the view.js script for this block. */ function block_core_form_view_script() { - // Refactoring required: this function must be guarded as it is available only in Gutenberg, and not in Core. - // phpcs:ignore Gutenberg.CodeAnalysis.ForbiddenFunctionsAndClasses.ForbiddenFunctionCall if ( ! gutenberg_is_experiment_enabled( 'gutenberg-form-blocks' ) ) { return; } @@ -203,8 +201,6 @@ function block_core_form_privacy_form() { * Registers the `core/form` block on server. */ function register_block_core_form() { - // Refactoring required: this function must be guarded as it is available only in Gutenberg, and not in Core. - // phpcs:ignore Gutenberg.CodeAnalysis.ForbiddenFunctionsAndClasses.ForbiddenFunctionCall if ( ! gutenberg_is_experiment_enabled( 'gutenberg-form-blocks' ) ) { return; } diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 4502b5f95fe9b..5e759572f29d3 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -155,6 +155,14 @@ ./packages/block-library/src/*/*.php + + ./packages/block-library/src/form-input/index.php + ./packages/block-library/src/form-submission-notification/index.php + ./packages/block-library/src/form/index.php