[wp-trac] [WordPress Trac] #60228: has_published_pages method does not always return intended result
WordPress Trac
noreply at wordpress.org
Wed Jul 17 16:31:59 UTC 2024
#60228: has_published_pages method does not always return intended result
--------------------------+------------------------------
Reporter: sconroy | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone: Awaiting Review
Component: Customize | Version: 6.0
Severity: minor | Resolution: maybelater
Keywords: | Focuses:
--------------------------+------------------------------
Changes (by sconroy):
* keywords: reporter-feedback =>
* status: new => closed
* resolution: => maybelater
Comment:
Replying to [comment:2 dlh]:
> Hi @sconroy, and welcome to WordPress Trac! Thanks for the report.
>
> What's an example use case of a `get_pages` filter that removes the
found page?
>
> The current logic was introduced in #55425, and the reasoning behind it
still stands, I think. Using `wp_count_posts()` is an interesting idea,
although that, too, is filterable.
Hello @dlh, thank you for the timely response and apologies for the late
reply.
After some much-needed refactoring of the legacy code that filtered out
the found page, this is no longer an issue for the code base I am working
on. I have marked this ticket as resolved.
While I could imagine a corner of the universe in which someone might want
to filter out a page and end up coming across the same issue I did, I
cannot put that imaginary use case into words and thus cannot advocate for
this fix even if I wanted to.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60228#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list