WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 5 weeks ago

#38836 reviewing enhancement

A current_page_parent CSS class is not added to relevant WP menu items if the query is for a custom post type single item

Reported by: henry.wright Owned by: SergeyBiryukov
Milestone: 5.3 Priority: normal
Severity: normal Version:
Component: Menus Keywords: has-patch has-unit-tests good-first-bug
Focuses: Cc:

Description

A current_page_parent CSS class doesn't get added to relevant post type archive menu items if the current query is for a custom post type single item.

Attachments (3)

38836.diff (1.0 KB) - added by henry.wright 3 years ago.
38836.2.diff (3.3 KB) - added by christophherr 3 years ago.
38836.3.diff (3.3 KB) - added by donmhico 7 weeks ago.
Refreshed the patch. I've re-test the patch and re-run the unit tests as well. Everything looks good.

Download all attachments as: .zip

Change History (13)

#1 @henry.wright
3 years ago

Steps to reproduce

  1. Add a post type archive item to a WP menu
  2. Visit a single item of that post type

Note that the current_page_parent CSS class isn't added to the menu item.

#2 @henry.wright
3 years ago

  • Component changed from General to Menus
  • Type changed from defect (bug) to enhancement

@henry.wright
3 years ago

#3 @henry.wright
3 years ago

  • Keywords has-patch added

Please find 38836.diff attached.

#4 @welcher
3 years ago

  • Keywords needs-unit-tests added

Patch looks ok to me. Let's get some unit test in place for it.

#5 @christophherr
3 years ago

  • Keywords has-unit-tests added; needs-unit-tests removed

38836.2.diff adds unit tests.

#6 @desrosj
6 months ago

  • Keywords needs-refresh good-first-bug added
  • Milestone changed from Awaiting Review to Future Release
  • Version 4.6.1 deleted

The latest patch needs a refresh to apply cleanly.

#7 @diouldebalde
2 months ago

<?php
[[Image([''''])]]

@donmhico
7 weeks ago

Refreshed the patch. I've re-test the patch and re-run the unit tests as well. Everything looks good.

#8 @donmhico
7 weeks ago

  • Keywords needs-refresh removed

#9 @SergeyBiryukov
6 weeks ago

  • Milestone changed from Future Release to 5.3
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

This ticket was mentioned in Slack in #core by sergey. View the logs.


5 weeks ago

Note: See TracTickets for help on using tickets.