[wp-trac] [WordPress Trac] #43654: Silence "JQMIGRATE: Migrate is installed with logging active, version x.y.z"

WordPress Trac noreply at wordpress.org
Wed Nov 17 19:05:55 UTC 2021


#43654: Silence "JQMIGRATE: Migrate is installed with logging active, version
x.y.z"
--------------------------+------------------------------
 Reporter:  markjaquith   |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  low           |   Milestone:  Awaiting Review
Component:  General       |     Version:
 Severity:  trivial       |  Resolution:
 Keywords:  close         |     Focuses:  javascript
--------------------------+------------------------------

Comment (by xaqrox):

 Here's something that disables all the console.trace-ing:

 {{{#!php
 <?php
 ​
 function _jqmigrate_mute() {
   wp_add_inline_script('jquery-migrate', 'jQuery.migrateMute = true;',
 'before');
 }
 ​
 add_action('wp_enqueue_scripts', '_jqmigrate_mute');
 add_action('admin_enqueue_scripts', '_jqmigrate_mute');
 }}}

 It doesn't silence the initial announcement, but it saves a heck of a lot
 of space otherwise.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/43654#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list