Skip to content

Bump WordPress / Gutenberg requirement #3546

@swissspidy

Description

@swissspidy

Feature description

The AMP Stories editor currently requires at least Gutenberg 5.9 due to some of the JS dependencies in the editor. Also, we require at least WordPress 5.0, even when the Gutenberg plugin is installed.

Now that WordPress 5.3 is around the corner which includes Gutenberg 6.6, we should adjust the requirements in \AMP_Story_Post_Type::has_required_block_capabilities() accordingly:

public static function has_required_block_capabilities() {
if ( ! function_exists( 'register_block_type' ) || version_compare( get_bloginfo( 'version' ), '5.0', '<' ) ) {
return false;
}
return (
( defined( 'GUTENBERG_DEVELOPMENT_MODE' ) && GUTENBERG_DEVELOPMENT_MODE )
||
( defined( 'GUTENBERG_VERSION' ) && version_compare( GUTENBERG_VERSION, self::REQUIRED_GUTENBERG_VERSION, '>=' ) )
);
}

To make maintenance and support easier, I suggest the following:

  • WordPress 5.3+ or
  • Gutenberg 6.6+

Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • The editor should be accessible on WordPress 5.3 RC 1 or higher, without requiring the Gutenberg plugin
  • If the WordPress version is older than WordPress 5.3, it should require the latest version of Gutenberg to be installed (6.6 as of this writing).

Implementation brief

  • Bump REQUIRED_GUTENBERG_VERSION
  • Make the requirements check pass for WordPress 5.3 RC and higher
  • Adjust inline documentation where necessary

QA testing instructions

  1. Check that you're using WordPress 5.3 RC
  2. Disable Gutenberg plugin
  3. Verify that the story editor is still functioning.

Demo

Changelog entry

  • Do not require Gutenberg to be active when running WordPress 5.3 or higher

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNew feature or improvement of an existing one

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions