[wp-trac] [WordPress Trac] #23816: wp_enqueue_script|style() dependency failures are silent

WordPress Trac noreply at wordpress.org
Tue Mar 19 12:26:21 UTC 2013


#23816: wp_enqueue_script|style() dependency failures are silent
-----------------------------+-------------------------
 Reporter:  johnbillion      |       Type:  enhancement
   Status:  new              |   Priority:  low
Milestone:  Awaiting Review  |  Component:  General
  Version:                   |   Severity:  normal
 Keywords:                   |
-----------------------------+-------------------------
 If I call `wp_enqueue_script()` or `wp_enqueue_style()` with a dependency
 that doesn't exist then I don't get told about it.

 Example:

 {{{
 wp_enqueue_script(
         'my-script',
         get_stylesheet_directory_uri() . '/my-script.js',
         array( 'script-that-does-not-exist' )
 );
 }}}

 Actual result: 'my-script' gets enqueued, but I don't get told that
 'script-that-does-not-exist' doesn't exist and wasn't enqueued.

 Expected result: When `WP_DEBUG` is true, I should get a PHP notice
 warning me that the dependency script doesn't exist.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23816>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list