WordPress.org

Make WordPress Core

Ticket #19568: 19568.diff

File 19568.diff, 680 bytes (added by georgestephanis, 6 years ago)
  • wp-includes/functions.wp-scripts.php

     
    110110                                '<code>wp_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>init</code>' ), '3.3' );
    111111                $wp_scripts = new WP_Scripts();
    112112        }
     113        if( is_admin() && in_array( $handle, array( 'jquery' ) ) ) {
     114                _doing_it_wrong( __FUNCTION__, sprintf( __( 'Please do not deregister %1$s in the admin interface, it is likely to break things.' ),
     115                        '<code>'.$handle.'</code>' ), null );
     116        }
    113117
    114118        $wp_scripts->remove( $handle );
    115119}