[wp-trac] [WordPress Trac] #43627: Method call uses 2 parameters, but method signature uses 1 parameters
WordPress Trac
noreply at wordpress.org
Sat Mar 24 16:38:43 UTC 2018
#43627: Method call uses 2 parameters, but method signature uses 1 parameters
---------------------------+--------------------
Reporter: kaggdesign | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.0
Component: Script Loader | Version: 4.9.4
Severity: normal | Resolution:
Keywords: | Focuses:
---------------------------+--------------------
Changes (by SergeyBiryukov):
* component: General => Script Loader
* milestone: Awaiting Review => 5.0
Comment:
Previously: #24770
> This is simple class inheritance. The `do_item()` method in
[http://core.trac.wordpress.org/browser/trunk/wp-includes/class.wp-
dependencies.php#L59 class.wp-dependencies.php] is a placeholder meant to
be overwritten when extending the class. When handling scripts
[http://core.trac.wordpress.org/browser/trunk/wp-includes/class.wp-
scripts.php#L19 WP_Dependencies is extended with WP_Scripts]. So
`$this->do_item()` executes the `do_item()` method of
[http://core.trac.wordpress.org/browser/trunk/wp-includes/class.wp-
scripts.php#L77 WP_Scripts] that expects the second argument. (The
WP_Dependencies::do_item() is still used in WP_Scripts but note how it's
called with `parent::do_item($handle)`.)
#24770 was not about the signature though, but rather about a missing
`wp_footer()` call in a theme.
Let's use this ticket to add `$group` parameter to
`WP_Dependencies::do_item()` to avoid further confusion.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43627#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list