[wp-trac] [WordPress Trac] #45009: Document that second parameter of WP_Dependencies::add() can be boolean

WordPress Trac noreply at wordpress.org
Thu Sep 27 09:34:47 UTC 2018


#45009: Document that second parameter of WP_Dependencies::add() can be boolean
---------------------------+-----------------------------
 Reporter:  dimadin        |      Owner:  (none)
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Script Loader  |    Version:
 Severity:  normal         |   Keywords:  has-patch
  Focuses:  docs           |
---------------------------+-----------------------------
 Although documentation states that second parameter of
 `WP_Dependencies::add()` is a string, it can be boolean `false`, used when
 item is an alias for one or more other dependencies.

 This is done, for example, for
 [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/script-
 loader.php?rev=43571#L224 jquery],
 [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/script-
 loader.php?rev=43571#L1154 wp-admin], and few other in core. It is
 expected for both [https://core.trac.wordpress.org/browser/trunk/src/wp-
 includes/class.wp-styles.php?rev=43564#L179 styles] and
 [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/class.wp-
 scripts.php?rev=43583#L319 scripts].

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45009>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list