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

[IMPROVEMENT] - wp_register_script changes in version 6.3 #390

Closed
dingo-d opened this issue Feb 6, 2024 · 1 comment
Closed

[IMPROVEMENT] - wp_register_script changes in version 6.3 #390

dingo-d opened this issue Feb 6, 2024 · 1 comment
Assignees
Labels
feature request New feature request improvement Small improvement fixes, either readability or performance improvements

Comments

@dingo-d
Copy link
Collaborator

dingo-d commented Feb 6, 2024

In WP 6.3, the core changed the $in_footer parameter to be an $args parameter array (because why not).

This will require changes wherever this function is used in the libs such as here on line 126:

\wp_register_script(
$handle,
$this->manifest->getAssetsManifestItem(static::ADMIN_SCRIPT_URI),
$this->getAdminScriptDependencies(),
$this->getAssetsVersion(),
$this->scriptInFooter()
);

The $args argument can be a boolean or a false (which means currently this won't break anything on the existing projects, which is great, no matter how this 'type' is just... sigh... WordPress...) that has strategy and in_footer keys.

See more: https://developer.wordpress.org/reference/functions/wp_register_script/#parameters

@iruzevic iruzevic self-assigned this Apr 28, 2024
@iruzevic iruzevic linked a pull request Apr 28, 2024 that will close this issue
@iruzevic iruzevic changed the title wp_register_script changes in version 6.3 [IMPROVEMENT] - wp_register_script changes in version 6.3 Apr 28, 2024
@iruzevic iruzevic added improvement Small improvement fixes, either readability or performance improvements feature request New feature request labels Apr 28, 2024
@iruzevic
Copy link
Member

iruzevic commented Jun 5, 2024

this is done in the latest release

@iruzevic iruzevic closed this as completed Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature request improvement Small improvement fixes, either readability or performance improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants