WordPress.org

Make WordPress Core

Opened 22 months ago

Last modified 5 months ago

#25666 new enhancement

Pass perpetrating $handle to enqueue_script's _doing_it_wrong() call

Reported by: bigdawggi Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Script Loader Keywords: needs-refresh
Focuses: Cc:

Description

So the debug message for enqueueing resources at the proper time is helpful, but finding out which one of a site's plugins or theme can be a tedious task. I suggest we pass the $handle that triggered the warning to the output, so we know exactly where to look (since it references back to wp-includes/functions.php).

Attachments (1)

helpful-doing-it-wrong-messages.patch (11.1 KB) - added by bigdawggi 22 months ago.

Download all attachments as: .zip

Change History (7)

comment:1 @bigdawggi22 months ago

... site's plugins or theme that's causing the problem ...

comment:2 @nacin19 months ago

  • Component changed from General to Script Loader

comment:3 @jdgrimes14 months ago

While this would be helpful, you can get this information and more by hooking into doing_it_wrong_run and logging the stack trace.

comment:5 @wonderboymusic7 months ago

  • Keywords needs-refresh added
  • Milestone changed from Awaiting Review to 4.2

comment:6 @DrewAPicture5 months ago

  • Milestone changed from 4.2 to Future Release

The latest patch from 17 months ago is blowing up and still needs a refresh. Let's try this in a future release.

Note: See TracTickets for help on using tickets.