Changes between Initial Version and Version 1 of Ticket #54884, comment 6
- Timestamp:
- 01/25/2022 07:55:38 AM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #54884, comment 6
initial v1 14 14 15 15 This means that it should be possible to disable it per site, rather than load it "just in case" on sites that don't need it. See also (#37110 and) #51812. 16 17 Here's the code for this too: 18 19 {{{ 20 add_action( 'wp_default_scripts', 'remove_jquery_migrate_script' ); 21 function remove_jquery_migrate_script( $scripts ) { 22 if ( ! is_admin() && isset( $scripts->registered['jquery'] ) ) { 23 $script = $scripts->registered['jquery']; 24 if ( $script->deps ) { 25 $script->deps = array_diff( $script->deps, array( 'jquery-migrate' ) ); 26 } 27 } 28 } 29 }}}