diff --git a/gutenberg.php b/gutenberg.php
index f46c44e33b472f..bdd7d4ebce6c2d 100644
--- a/gutenberg.php
+++ b/gutenberg.php
@@ -99,7 +99,7 @@ function gutenberg_menu() {
function gutenberg_wordpress_version_notice() {
echo '
';
/* translators: %s: Minimum required version */
- printf( __( 'Gutenberg requires WordPress %s or later to function properly. Please upgrade WordPress before activating Gutenberg.', 'gutenberg' ), '5.2.0' );
+ printf( __( 'Gutenberg requires WordPress %s or later to function properly. Please upgrade WordPress before activating Gutenberg.', 'gutenberg' ), '5.3.0' );
echo '
';
deactivate_plugins( array( 'gutenberg/gutenberg.php' ) );
@@ -134,7 +134,7 @@ function gutenberg_pre_init() {
// Strip '-src' from the version string. Messes up version_compare().
$version = str_replace( '-src', '', $wp_version );
- if ( version_compare( $version, '5.2.0', '<' ) ) {
+ if ( version_compare( $version, '5.3.0', '<' ) ) {
add_action( 'admin_notices', 'gutenberg_wordpress_version_notice' );
return;
}
diff --git a/lib/client-assets.php b/lib/client-assets.php
index 590fbcc9ad0264..a814643fc7b4d8 100644
--- a/lib/client-assets.php
+++ b/lib/client-assets.php
@@ -205,38 +205,17 @@ function gutenberg_override_style( &$styles, $handle, $src, $deps = array(), $ve
*
* @param WP_Scripts $scripts WP_Scripts instance (passed by reference).
*/
-function gutenberg_register_vendor_scripts( &$scripts ) {
- $suffix = SCRIPT_DEBUG ? '' : '.min';
-
- // Vendor Scripts.
- $react_suffix = ( SCRIPT_DEBUG ? '.development' : '.production' ) . $suffix;
-
- // TODO: Overrides for react, react-dom and lodash are necessary
- // until WordPress 5.3 is released.
- gutenberg_register_vendor_script(
- $scripts,
- 'react',
- 'https://unpkg.com/react@16.9.0/umd/react' . $react_suffix . '.js',
- array( 'wp-polyfill' ),
- '16.9.0',
- true
- );
- gutenberg_register_vendor_script(
- $scripts,
- 'react-dom',
- 'https://unpkg.com/react-dom@16.9.0/umd/react-dom' . $react_suffix . '.js',
- array( 'react' ),
- '16.9.0',
- true
- );
- gutenberg_register_vendor_script(
- $scripts,
- 'lodash',
- 'https://unpkg.com/lodash@4.17.15/lodash' . $suffix . '.js',
- array(),
- '4.17.15',
- true
- );
+function gutenberg_register_vendor_scripts( &$scripts ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ // This function is intentionally left empty.
+ //
+ // Scripts such as react and react-dom are expected to be overridden soon,
+ // and it is preferred to keep this function in place so as not to disturb
+ // tooling related to the plugin build process.
+ //
+ // TODO: Remove phpcs exception in function signature once this function
+ // regains its use.
+ //
+ // See https://github.com/WordPress/gutenberg/pull/20628.
}
add_action( 'wp_default_scripts', 'gutenberg_register_vendor_scripts' );
@@ -627,57 +606,6 @@ function gutenberg_extend_block_editor_styles( $settings ) {
}
add_filter( 'block_editor_settings', 'gutenberg_extend_block_editor_styles' );
-/**
- * Extends block editor preload paths to preload additional data. Note that any
- * additions here should be complemented with a corresponding core ticket to
- * reconcile the change upstream for future removal from Gutenberg.
- *
- * @param array $preload_paths Array of paths to preload.
- * @param WP_Post $post Post being edited.
- *
- * @return array Filtered array of paths to preload.
- */
-function gutenberg_extend_block_editor_preload_paths( $preload_paths, $post ) {
- /*
- * Preload any autosaves for the post. (see https://github.com/WordPress/gutenberg/pull/7945)
- *
- * Trac ticket: https://core.trac.wordpress.org/ticket/46974
- *
- * At the time of writing, the change is not committed or released
- * in core. This path should be removed from Gutenberg when the code is
- * released in core, and the corresponding release version becomes
- * the minimum supported version.
- */
- $post_type_object = get_post_type_object( $post->post_type );
-
- if ( isset( $post_type_object ) ) {
- $rest_base = ! empty( $post_type_object->rest_base ) ? $post_type_object->rest_base : $post_type_object->name;
- $autosaves_path = sprintf( '/wp/v2/%s/%d/autosaves?context=edit', $rest_base, $post->ID );
-
- if ( ! in_array( $autosaves_path, $preload_paths, true ) ) {
- $preload_paths[] = $autosaves_path;
- }
- }
-
- /*
- * Used in considering user permissions for creating and updating blocks,
- * as condition for displaying relevant actions in the interface.
- *
- * Trac ticket: https://core.trac.wordpress.org/ticket/46429
- *
- * This is present in WordPress 5.2 and should be removed from Gutenberg
- * once WordPress 5.2 is the minimum supported version.
- */
- $blocks_path = array( '/wp/v2/blocks', 'OPTIONS' );
-
- if ( ! in_array( $blocks_path, $preload_paths, true ) ) {
- $preload_paths[] = $blocks_path;
- }
-
- return $preload_paths;
-}
-add_filter( 'block_editor_preload_paths', 'gutenberg_extend_block_editor_preload_paths', 10, 2 );
-
/**
* Extends block editor settings to include a list of image dimensions per size.
*
diff --git a/lib/compat.php b/lib/compat.php
index 3e4affe6a8937c..9fc297fbf73776 100644
--- a/lib/compat.php
+++ b/lib/compat.php
@@ -8,28 +8,6 @@
* @package gutenberg
*/
-/**
- * Filters allowed CSS attributes to include `flex-basis`, included in saved
- * markup of the Column block.
- *
- * This can be removed when plugin support requires WordPress 5.3.0+.
- *
- * @see https://core.trac.wordpress.org/ticket/47281
- * @see https://core.trac.wordpress.org/changeset/45363
- *
- * @since 5.7.0
- *
- * @param string[] $attr Array of allowed CSS attributes.
- *
- * @return string[] Filtered array of allowed CSS attributes.
- */
-function gutenberg_safe_style_css_column_flex_basis( $attr ) {
- $attr[] = 'flex-basis';
-
- return $attr;
-}
-add_filter( 'safe_style_css', 'gutenberg_safe_style_css_column_flex_basis' );
-
/**
* Adds a polyfill for the WHATWG URL in environments which do not support it.
* The intention in how this action is handled is under the assumption that this
diff --git a/phpunit/class-extend-preload-paths-test.php b/phpunit/class-extend-preload-paths-test.php
deleted file mode 100644
index 357eda859b06fa..00000000000000
--- a/phpunit/class-extend-preload-paths-test.php
+++ /dev/null
@@ -1,44 +0,0 @@
-post->create_and_get();
- }
-
- /**
- * Tests paths added if missing.
- */
- function test_localizes_script() {
- $preload_paths = gutenberg_extend_block_editor_preload_paths( array(), self::$post );
-
- $expected_blocks_path = array( '/wp/v2/blocks', 'OPTIONS' );
- $expected_autosaves_path = sprintf( '/wp/v2/%s/%d/autosaves?context=edit', 'posts', self::$post->ID );
-
- $this->assertEquals( array( $expected_autosaves_path, $expected_blocks_path ), $preload_paths );
- }
-
- /**
- * Tests paths not added if present.
- */
- function test_replaces_registered_properties() {
- $existing_blocks_path = array( '/wp/v2/blocks', 'OPTIONS' );
- $existing_autosaves_path = sprintf( '/wp/v2/%s/%d/autosaves?context=edit', 'posts', self::$post->ID );
- $existing_preload_paths = array( $existing_blocks_path, $existing_autosaves_path );
-
- $preload_paths = gutenberg_extend_block_editor_preload_paths( $existing_preload_paths, self::$post );
-
- $this->assertEquals( $existing_preload_paths, $preload_paths );
- }
-}
diff --git a/readme.txt b/readme.txt
index 4e2cd399d48614..f740b842fa4e21 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,6 +1,6 @@
=== Gutenberg ===
Contributors: matveb, joen, karmatosed
-Requires at least: 5.2.0
+Requires at least: 5.3.0
Tested up to: 5.3
Stable tag: V.V.V
License: GPLv2 or later