mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-31 13:37:51 +01:00
Editor: Remove unnecessary code for ensuring interactivity API dependency in block core functions
Removing old code for registering the private version of the Interactivity API pre-6.5. Props czapla, gziolo, shailu25, cbravobernal. Fixes #60913. Built from https://develop.svn.wordpress.org/trunk@58322 git-svn-id: http://core.svn.wordpress.org/trunk@57779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e978cba1e5
commit
6635e1b9f3
@ -6249,18 +6249,9 @@ function the_block_template_skip_link() {
|
||||
*
|
||||
* @since 6.4.0
|
||||
* @deprecated 6.5.0
|
||||
*
|
||||
* @global WP_Scripts $wp_scripts
|
||||
*/
|
||||
function block_core_query_ensure_interactivity_dependency() {
|
||||
_deprecated_function( __FUNCTION__, '6.5.0', 'wp_register_script_module' );
|
||||
global $wp_scripts;
|
||||
if (
|
||||
isset( $wp_scripts->registered['wp-block-query-view'] ) &&
|
||||
! in_array( 'wp-interactivity', $wp_scripts->registered['wp-block-query-view']->deps, true )
|
||||
) {
|
||||
$wp_scripts->registered['wp-block-query-view']->deps[] = 'wp-interactivity';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -6268,18 +6259,9 @@ function block_core_query_ensure_interactivity_dependency() {
|
||||
*
|
||||
* @since 6.4.0
|
||||
* @deprecated 6.5.0
|
||||
*
|
||||
* @global WP_Scripts $wp_scripts
|
||||
*/
|
||||
function block_core_file_ensure_interactivity_dependency() {
|
||||
_deprecated_function( __FUNCTION__, '6.5.0', 'wp_register_script_module' );
|
||||
global $wp_scripts;
|
||||
if (
|
||||
isset( $wp_scripts->registered['wp-block-file-view'] ) &&
|
||||
! in_array( 'wp-interactivity', $wp_scripts->registered['wp-block-file-view']->deps, true )
|
||||
) {
|
||||
$wp_scripts->registered['wp-block-file-view']->deps[] = 'wp-interactivity';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -6287,18 +6269,9 @@ function block_core_file_ensure_interactivity_dependency() {
|
||||
*
|
||||
* @since 6.4.0
|
||||
* @deprecated 6.5.0
|
||||
*
|
||||
* @global WP_Scripts $wp_scripts
|
||||
*/
|
||||
function block_core_image_ensure_interactivity_dependency() {
|
||||
_deprecated_function( __FUNCTION__, '6.5.0', 'wp_register_script_module' );
|
||||
global $wp_scripts;
|
||||
if (
|
||||
isset( $wp_scripts->registered['wp-block-image-view'] ) &&
|
||||
! in_array( 'wp-interactivity', $wp_scripts->registered['wp-block-image-view']->deps, true )
|
||||
) {
|
||||
$wp_scripts->registered['wp-block-image-view']->deps[] = 'wp-interactivity';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -283,10 +283,6 @@ function wp_default_packages_scripts( $scripts ) {
|
||||
*/
|
||||
$assets = include ABSPATH . WPINC . "/assets/script-loader-packages{$suffix}.php";
|
||||
|
||||
// Add the private version of the Interactivity API manually.
|
||||
$scripts->add( 'wp-interactivity', '/wp-includes/js/dist/interactivity.min.js' );
|
||||
did_action( 'init' ) && $scripts->add_data( 'wp-interactivity', 'strategy', 'defer' );
|
||||
|
||||
foreach ( $assets as $file_name => $package_data ) {
|
||||
$basename = str_replace( $suffix . '.js', '', basename( $file_name ) );
|
||||
$handle = 'wp-' . $basename;
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.6-alpha-58321';
|
||||
$wp_version = '6.6-alpha-58322';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user