-
Notifications
You must be signed in to change notification settings - Fork 0
(fix): add post status draft to query #2
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
Conversation
|
Coverage report for commit: e5f925b Summary - Lines: - | Methods: -
🤖 comment via lucassabreu/comment-coverage-clover |
||||||||||||||||||||||||||||||||
src/Components/PatternContent.php
Outdated
| { | ||
| $pattern = new \WP_Query([ | ||
| 'post_type' => 'wp_block', | ||
| 'post_status' => 'draft', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weet je zeker dat het altijd om drafts gaat?
Anders voor de zekerheid: 'post_status' => ['publish', 'draft'],
|
Haha ohdamm scherp lara : P ik had nog niet gekeken of mijn footer wel werkte in incognito 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ik zie af en toe data phpcsfixer blijft hangen (hier niet het geval) en dat is dus niet een concreet probleem.
maar de falende phpstan, die lijkt wel echt dingen te melden over Typing van dingen.
misschien dat daar nog even naar gekeken moet worden ;s
e24146c to
e5f925b
Compare
De footer werd niet zichtbaar als je niet ingelogd bent. Dit komt omdat post_status standaard op publish staat en als je ingelogd bent dan komen er daar een aantal bij, zie: https://developer.wordpress.org/reference/classes/wp_query/#status-parameters. Omdat in de code geregeld is dat patronen altijd als draft opgeslagen worden denk ik dat dit wel de oplossing is.