[wp-trac] [WordPress Trac] #57198: WP_Customize_Manager::has_published_pages() fails when queried page is not top-level
WordPress Trac
noreply at wordpress.org
Thu Nov 24 15:04:26 UTC 2022
#57198: WP_Customize_Manager::has_published_pages() fails when queried page is not
top-level
--------------------------+-----------------------------
Reporter: felipelavinz | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Customize | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
The **Homepage Settings** section on the customizer uses
`WP_Customize_Manager::has_published_pages()` as `active_callback`.
Unfortunately, the changes introduced for bug #55425 lead to an error with
the logical check, which is that when the queried page it's not top-level
(`post_parent = 0`), `get_pages()` incorrectly returns an empty array.
This could be solved by adding `'hierarchical' => 0` to the `get_pages()`
arguments.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57198>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list