Skip to content
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

Plugin: Remove 5.0-merged block registration functions, integrations #13412

Merged
merged 1 commit into from
Jan 23, 2019

Conversation

aduth
Copy link
Member

@aduth aduth commented Jan 21, 2019

Related: #11015
Blocked by: #13370

This pull request seeks to remove block registration classes and block integration PHP code which has been merged as part of the 5.0 release.

The classes will never have been loaded in a WordPress 5.0 environment, since they're conditionally loaded by the non-presence of the class.

The following functions are specific to Gutenberg, either by prefix or non-merge to 5.0. They have been marked as deprecated, and should be removed from the Gutenberg plugin.

  • gutenberg_parse_blocks (use parse_blocks() instead)
  • get_dynamic_blocks_regex (not used)
  • gutenberg_render_block (use render_block() instead)
  • strip_dynamic_blocks (handled in core by excerpt_remove_blocks†)
  • strip_dynamic_blocks_add_filter (handled in core by excerpt_remove_blocks†)
  • strip_dynamic_blocks_remove_filter (handled in core by excerpt_remove_blocks†)

I'm uncertain about the use of _deprecated_function as it's intended for use in deprecating core functions, but there is precedent for it already.

† The removed test case test_excerpt_infinite_loop does not seem to have an equivalent in the wordpress-develop repository.

@aduth aduth added [Feature] Block API API that allows to express the block paradigm. Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts labels Jan 21, 2019
lib/blocks.php Outdated
*
* @param string $content Content of the current post.
* @return string
*/
function strip_dynamic_blocks( $content ) {
_deprecated_function( __FUNCTION__, '4.9.0' );
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the intent here to remove these in 5.1?

Copy link
Member Author

Choose a reason for hiding this comment

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

Is the intent here to remove these in 5.1?

That would be the idea, yes.

I can plan to add a note:

https://wordpress.org/gutenberg/handbook/designers-developers/developers/backward-compatibility/deprecations/

@aduth aduth force-pushed the remove/blocks-registry-render-php branch from ed99f33 to 4d185c2 Compare January 23, 2019 15:47
@aduth aduth merged commit b9e7686 into master Jan 23, 2019
@aduth aduth deleted the remove/blocks-registry-render-php branch January 23, 2019 16:05
daniloercoli added a commit that referenced this pull request Jan 24, 2019
…rnmobile/372-add-title-to-gutenberg-mobile

* 'master' of https://github.com/WordPress/gutenberg: (56 commits)
  Save package-lock.json file changes (#13481)
  Plugin: Deprecate gutenberg_add_responsive_body_class (#13461)
  Add speak messages to the feature toggle component. (#13385)
  Plugin: Deprecate gutenberg_kses_allowedtags (#13460)
  Plugin: Deprecate gutenberg_bulk_post_updated_messages (#13472)
  Plugin: Avoid calling deprecated gutenberg_silence_rest_errors (#13446)
  Plugin: Deprecate gutenberg_remove_wpcom_markdown_support (#13473)
  Fix: Categories block: add custom classes only to wrapper (#13439)
  is-shallow-equal: Use ES5 ruleset from eslint-plugin module (#13428)
  Update and Organize Contributors Guide per #12916 (#13352)
  Dismissible-notices: fix text overlapping icon (X) (#13371)
  Framework: Remove 5.0-merged REST API integrations (#13408)
  Plugin: Remove 5.0-merged block registration functions, integrations (#13412)
  Framework: Bump minimum required WP to 5.x (#13370)
  [Mobile] Improve keyboard hide button (#13415)
  Improve castError handling of non strings (#13315)
  Fix: File block add custom class (#13432)
  Consider making Fullscreen Mode effects visible only on larger screens (#13425)
  Update plugin version to 4.9.0 (#13436)
  DateTimePicker: fix prop warning for (#12933)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block API API that allows to express the block paradigm. Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants