Skip to content

Fine-grained disable the block editor #2496

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 23 commits into
base: bucket/editor
Choose a base branch
from

Conversation

JPry
Copy link
Contributor

@JPry JPry commented Apr 12, 2025

  • Add initial block editor controller
  • Add methods for block loading for post type
  • Use ::class to reference the registered classes
  • Register the Block_Logic provider
  • Mark the editor class as deferred
  • Remove no-op method
  • Tweak Regexes
  • Correct docblock parameters
  • Simplify dynamic block stripping
  • Fix typo
  • Use interpolation and clean up some methods
  • Apply formatting to the file

🎫 Ticket

[TICKET_ID]

🗒️ Description

🎥 Artifacts

✔️ Checklist

  • Ran npm run changelog to add changelog file(s). More info here
  • Code is covered by NEW wpunit or integration tests.
  • Code is covered by EXISTING wpunit or integration tests.
  • Are all the required tests passing?
  • Automated code review comments are addressed.
  • Have you added Artifacts?
  • Check the base branch for your PR.
  • Add your PR to the project board for the release.

@JPry JPry self-assigned this Apr 12, 2025
@@ -1,7 +1,6 @@
<?php

abstract class Tribe__Editor__Blocks__Abstract
implements Tribe__Editor__Blocks__Interface {
abstract class Tribe__Editor__Blocks__Abstract implements Tribe__Editor__Blocks__Interface {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
StellarWP.Classes.ValidClassName.NotSnakeCase
Class name "Tribe__Editor__Blocks__Abstract" is not in Capitalized_Snake_Case format

@@ -1,7 +1,6 @@
<?php

abstract class Tribe__Editor__Blocks__Abstract
implements Tribe__Editor__Blocks__Interface {
abstract class Tribe__Editor__Blocks__Abstract implements Tribe__Editor__Blocks__Interface {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Squiz.Commenting.ClassComment.Missing
Missing doc comment for class Tribe__Editor__Blocks__Abstract

@@ -1,7 +1,6 @@
<?php

abstract class Tribe__Editor__Blocks__Abstract
implements Tribe__Editor__Blocks__Interface {
abstract class Tribe__Editor__Blocks__Abstract implements Tribe__Editor__Blocks__Interface {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
PEAR.NamingConventions.ValidClassName.Invalid
Class name is not valid; consider Tribe_Editor_Blocks_Abstract instead

@@ -54,12 +53,11 @@
*
* @since 4.8
*
* @param array $attributes
* @param array $attributes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Squiz.Commenting.FunctionComment.MissingParamComment
Missing parameter comment

@@ -54,12 +53,11 @@
*
* @since 4.8
*
* @param array $attributes
* @param array $attributes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Squiz.Commenting.FunctionComment.ParamNameNoMatch
Doc comment for parameter $attributes does not match actual variable name $params

}

/**
* Since we are dealing with a Dynamic type of Block we need a PHP method to render it
*
* @since 4.8
*
* @param array $attributes
* @param array $attributes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Squiz.Commenting.FunctionComment.MissingParamComment
Missing parameter comment

@@ -174,10 +165,11 @@
* the pattern of a block but not validating its structure. For strict accuracy
* you should use the block parser on post content.
*
* @since 4.8
* @see gutenberg_parse_blocks()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
StellarWP.Whitespace.DocCommentSpacing.ExtraSpaces
There should be exactly one space after the @see tag, not multiple.

@tec-bot
Copy link
Contributor

tec-bot commented Apr 16, 2025

PR to update Action Scheduler version to match WooCommerce version has been created: #2514

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants