Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#45009 closed defect (bug) (fixed)

Document that second parameter of WP_Dependencies::add() can be boolean

Reported by: dimadin's profile dimadin Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.1 Priority: normal
Severity: normal Version:
Component: Script Loader Keywords: has-patch good-first-bug
Focuses: docs Cc:

Description

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 jquery, wp-admin, and few other in core. It is expected for both styles and scripts.

Attachments (1)

45009.diff (3.4 KB) - added by dimadin 6 years ago.

Download all attachments as: .zip

Change History (5)

@dimadin
6 years ago

#1 @mukesh27
6 years ago

  • Keywords good-first-bug added

#2 @SergeyBiryukov
6 years ago

  • Milestone changed from Awaiting Review to 5.0

#3 @SergeyBiryukov
6 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 43661:

Docs: Document that the $src parameter of WP_Dependencies::add() can be boolean.

Props dimadin.
Fixes #45009.

#4 @johnbillion
6 years ago

  • Milestone changed from 5.0 to 5.1
Note: See TracTickets for help on using tickets.