Make WordPress Core

Changeset 58322


Ignore:
Timestamp:
06/04/2024 07:37:06 AM (7 weeks ago)
Author:
gziolo
Message:

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.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/deprecated.php

    r58284 r58322  
    62506250 * @since 6.4.0
    62516251 * @deprecated 6.5.0
    6252  *
    6253  * @global WP_Scripts $wp_scripts
    62546252 */
    62556253function block_core_query_ensure_interactivity_dependency() {
    62566254    _deprecated_function( __FUNCTION__, '6.5.0', 'wp_register_script_module' );
    6257     global $wp_scripts;
    6258     if (
    6259         isset( $wp_scripts->registered['wp-block-query-view'] ) &&
    6260         ! in_array( 'wp-interactivity', $wp_scripts->registered['wp-block-query-view']->deps, true )
    6261     ) {
    6262         $wp_scripts->registered['wp-block-query-view']->deps[] = 'wp-interactivity';
    6263     }
    62646255}
    62656256
     
    62696260 * @since 6.4.0
    62706261 * @deprecated 6.5.0
    6271  *
    6272  * @global WP_Scripts $wp_scripts
    62736262 */
    62746263function block_core_file_ensure_interactivity_dependency() {
    62756264    _deprecated_function( __FUNCTION__, '6.5.0', 'wp_register_script_module' );
    6276     global $wp_scripts;
    6277     if (
    6278         isset( $wp_scripts->registered['wp-block-file-view'] ) &&
    6279         ! in_array( 'wp-interactivity', $wp_scripts->registered['wp-block-file-view']->deps, true )
    6280     ) {
    6281         $wp_scripts->registered['wp-block-file-view']->deps[] = 'wp-interactivity';
    6282     }
    62836265}
    62846266
     
    62886270 * @since 6.4.0
    62896271 * @deprecated 6.5.0
    6290  *
    6291  * @global WP_Scripts $wp_scripts
    62926272 */
    62936273function block_core_image_ensure_interactivity_dependency() {
    62946274    _deprecated_function( __FUNCTION__, '6.5.0', 'wp_register_script_module' );
    6295     global $wp_scripts;
    6296     if (
    6297         isset( $wp_scripts->registered['wp-block-image-view'] ) &&
    6298         ! in_array( 'wp-interactivity', $wp_scripts->registered['wp-block-image-view']->deps, true )
    6299     ) {
    6300         $wp_scripts->registered['wp-block-image-view']->deps[] = 'wp-interactivity';
    6301     }
    63026275}
    63036276
  • trunk/src/wp-includes/script-loader.php

    r58288 r58322  
    283283     */
    284284    $assets = include ABSPATH . WPINC . "/assets/script-loader-packages{$suffix}.php";
    285 
    286     // Add the private version of the Interactivity API manually.
    287     $scripts->add( 'wp-interactivity', '/wp-includes/js/dist/interactivity.min.js' );
    288     did_action( 'init' ) && $scripts->add_data( 'wp-interactivity', 'strategy', 'defer' );
    289285
    290286    foreach ( $assets as $file_name => $package_data ) {
Note: See TracChangeset for help on using the changeset viewer.