[wp-trac] [WordPress Trac] #37782: Duplicate Page Entry in View All Pages when generating a Menu
WordPress Trac
noreply at wordpress.org
Sat Sep 22 19:11:43 UTC 2018
#37782: Duplicate Page Entry in View All Pages when generating a Menu
-------------------------------------+---------------------------------
Reporter: garrett-eclipse | Owner: garrett-eclipse
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: Awaiting Review
Component: Menus | Version: 3.0
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses: ui, administration
-------------------------------------+---------------------------------
Comment (by garrett-eclipse):
Reviewing this further I thought the implementation would benefit from
expanding to include `page_for_posts` and `wp_page_for_privacy_policy` as
found in `_post_states()`;
https://github.com/WordPress/WordPress/blob/56c162fbc9867f923862f64f1b4570d885f1ff03
/wp-admin/includes/template.php#L1908-L1920
Posted a new concept.
Sadly I had to create a `get_post_status` method instead of just using
`_post_states` as it just echos and I needed to append. Was that the right
approach? Or should I have updated it to simply use a param default `$echo
= true`.
Also am going to revise I believe to use the posts__not_in array on the
original query rather than running a foreach to unset posts.
But thoughts on current direction appreciated.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37782#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list