• Hi,
    This plugin has been very useful since the JQuery upgrade in WordPress. I have been able to fix most issue of deprecated code in themes and plugins that are no longer supported, or from authors do not understand the importance and think that jQuery Migrate Helper provides a fix. Although fixing these will mean that the fixes are are lost, if I forget and there is an update that still hasn’t fixed the issue.
    I keep my WordPress up-to-date, but often get deprecated warnings from WordPress Core, e.g.

    <code>2022-12-27 10:45:23 jQuery.fn.mousedown() event shorthand is deprecated WordPress core /wp-admin/js/farbtastic.</code>

    For a long time I have been curious why this should be since all involved in developing the core must be aware of the need to avoid deprecated code. Am I missing something?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @malae

    For a long time I have been curious why this should be since all involved in developing the core must be aware of the need to avoid deprecated code. Am I missing something?

    Thank you for bringing this forward, are you able to provide more information about this. I have a few questions that might help to narrow this down:

    1. Is there anything in particular that triggers this error for you, what will you be working on?
    2. Do you continue to see the error when all plugins are deactivated and your site is using one of the default Twenty** WordPress themes?
    Thread Starter Malae

    (@malae)

    Hi @thelmachido

    Thank you for expressing an interest in this issue. I will provide you with more information as follows:

    The WordPress version is 6.1.1 on all sites. Plugin Query Monitor 3.11.1.

    The reappearance of the warnings after clearing the logs varies, presumably depending on what activities trigger them. After clearing the logs on two sites, one with TwentyEleven and another with TwentySixteen they have not yet reappeared, so did not proceed with the deactivation of the plugins. The third site with the Creativ Kidndergarten theme regenerates warning, but I haven’t yet had the time to deactivate the plugins.

    Theme: TwentyEleven
    2022-12-27 10:45:23 jQuery.fn.mousedown() event shorthand is deprecated /wp-admin/js/farbtastic.js
    2022-12-27 10:45:23 jQuery.fn.bind() is deprecated WordPress core /wp-admin/js/farbtastic.js

    Theme: TwentySixteen
    2022-12-11 21:26:22 jQuery.fn.mousedown() event shorthand is deprecated /wp-admin/js/farbtastic.js
    2022-12-11 21:26:22 jQuery.fn.bind() is deprecated /wp-admin/js/farbtastic.js

    Theme: Creative Kindergarten
    2023-01-05 22:52:15 jQuery.fn.mousedown() event shorthand is deprecated /wp-admin/js/farbtastic.js
    2023-01-05 22:57:59 jQuery.fn.bind() is deprecated /wp-admin/js/farbtastic.js

    The farbtastic.js file is the one producing the warnings. In farbtastic.js I found the following:
    line 116 fb.mousedown = function (event) {
    line 265 $('*', e).mousedown(fb.mousedown);
    line 119 $(document).bind('mousemove', fb.mousemove).bind('mouseup', fb.mouseup);

    I hope the above will help.

    Hi @malae thanks for bringing this to our attention. This does look like something that might need to be looked at from WP Core’s end, you can create a bug report below:

    https://core.trac.www.ads-software.com/newticket

    Once you have created the ticket please share a link to the ticket here for future reference. Let me know if you need any assistance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Deprecated JQuery in WordPress core’ is closed to new replies.