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

Add workaround for doingitwrong warning #12

Merged
merged 1 commit into from
Mar 30, 2024

Conversation

aaemnnosttv
Copy link
Owner

This PR adds a simple workaround to avoid the _doing_it_wrong warning which is raised as a side-effect of instantiating WP_Styles since WP 5.8. See https://core.trac.wordpress.org/ticket/53848

The added WP_Query does not do anything other than to prevent warning such as "Conditional query tags do not work before the query is run" without running any query. Admittedly a bit of a hack, but it should avoid filling up log files until this is addressed in core.

Fixes #9

@aaemnnosttv aaemnnosttv merged commit 27eef9f into master Mar 30, 2024
5 checks passed
@aaemnnosttv aaemnnosttv deleted the doingitwrong-workaround branch March 30, 2024 00:43
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

Successfully merging this pull request may close these issues.

_doing_it_wrong notice in WP 5.8
1 participant