Skip to content

Commit

Permalink
Remove wordpress-6.0 specific code.
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Dec 7, 2022
1 parent 9b136bb commit aafe2b6
Show file tree
Hide file tree
Showing 29 changed files with 35 additions and 2,998 deletions.
2 changes: 1 addition & 1 deletion gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Gutenberg
* Plugin URI: https://github.com/WordPress/gutenberg
* Description: Printing since 1440. This is the development plugin for the new block editor in core.
* Requires at least: 5.9
* Requires at least: 6.0
* Requires PHP: 5.6
* Version: 14.7.0-rc.1
* Author: Gutenberg Team
Expand Down
31 changes: 31 additions & 0 deletions lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,37 @@ function gutenberg_enqueue_stored_styles( $options = array() ) {
}
}

/**
* Registers vendor JavaScript files to be used as dependencies of the editor
* and plugins.
*
* This function is called from a script during the plugin build process, so it
* should not call any WordPress PHP functions.
*
* @since 13.0
*
* @param WP_Scripts $scripts WP_Scripts instance.
*/
function gutenberg_register_vendor_scripts( $scripts ) {
$extension = SCRIPT_DEBUG ? '.js' : '.min.js';

gutenberg_override_script(
$scripts,
'react',
gutenberg_url( 'build/vendors/react' . $extension ),
// See https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/main/docs/TROUBLESHOOTING.md#externalising-react.
SCRIPT_DEBUG ? array( 'wp-react-refresh-entry', 'wp-polyfill' ) : array( 'wp-polyfill' )
);
gutenberg_override_script(
$scripts,
'react-dom',
gutenberg_url( 'build/vendors/react-dom' . $extension ),
array( 'react' )
);
}
add_action( 'wp_default_scripts', 'gutenberg_register_vendor_scripts' );


/*
* Always remove the Core action hook while gutenberg_enqueue_stored_styles() exists to avoid styles being printed twice.
* This is also because gutenberg_enqueue_stored_styles uses the Style Engine's `gutenberg_*` functions and `_Gutenberg` classes,
Expand Down
35 changes: 0 additions & 35 deletions lib/compat/wordpress-6.0/block-editor-settings.php

This file was deleted.

57 changes: 0 additions & 57 deletions lib/compat/wordpress-6.0/block-gallery.php

This file was deleted.

217 changes: 0 additions & 217 deletions lib/compat/wordpress-6.0/block-patterns-update.php

This file was deleted.

Loading

0 comments on commit aafe2b6

Please sign in to comment.