Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outdated sniff: WordPress.WP.EnqueuedResourceParameters.NotInFooter #2420

Open
luistar15 opened this issue Feb 5, 2024 · 3 comments
Open

Comments

@luistar15
Copy link

luistar15 commented Feb 5, 2024

Bug Description

$in_footer is no longer a parameter of wp_register_script.
Now is part of $args parameter.

@jrfnl
Copy link
Member

jrfnl commented Feb 5, 2024

@luistar15 Thanks for bringing this to our attention.

Just had a quick look: this change was made in WP 6.3, so will need a minimum WP based toggle. Additionally, what with $args being an array, this will now become much, much harder to detect.

@dingo-d
Copy link
Member

dingo-d commented Feb 6, 2024

Just had a quick look: this change was made in WP 6.3, so will need a minimum WP based toggle. Additionally, what with $args being an array, this will now become much, much harder to detect.

Even better, that argument can be a boolean or an array (which was done to avoid BC break)...

It seems that at least the array has specific keys so these can be checked but this definitely complicates things.

@jrfnl
Copy link
Member

jrfnl commented Feb 6, 2024

True, the array has specific keys, but what with it being an array, chances of it not being defined in the function call, but elsewhere are much much higher (class constant, class property, passed in via a function parameter, declared within the same function, but not in the function call, conditionally declared)

To be honest, I think it will mean that the sniff will have to be removed as we can no longer reliably detect anything about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants