WordPress.org

Make WordPress Core

Opened 5 months ago

Closed 5 months ago

Last modified 4 months ago

#45009 closed defect (bug) (fixed)

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

Reported by: dimadin Owned by: 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 5 months ago.

Download all attachments as: .zip

Change History (5)

@dimadin
5 months ago

#1 @mukesh27
5 months ago

  • Keywords good-first-bug added

#2 @SergeyBiryukov
5 months ago

  • Milestone changed from Awaiting Review to 5.0

#3 @SergeyBiryukov
5 months 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
4 months ago

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