Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#8682 closed defect (bug) (fixed)

Missing capability to override Walker_Cat*

Reported by: AaronCampbell Owned by:
Milestone: 2.7.1 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch needs-testing
Focuses: Cc:


Allow #8673

Summery: PATCH to add the ability to override Walker_Category, Walker_CategoryDropdown, and Walker_Category_Checklist.

The Comment Walker can be overridden by a user supplied object, and #8673 added that capability to the page walker (Walker_Page) and the dropdown page walker (Walker_PageDropdown).

Attached is a patch which adds the ability to supply your own walker objects for the category walkers. It uses the same method as for Walker_Comment (a instantiated class supplied to the wp_list_pages() or wp_dropdown_pages() function call. I added a check to make sure the walker that's passed in is of the Walker class or has it as one of its parents. That check isn't in other areas of WP, so if you want me to remove it I can.

Attachments (1)

8682.001.diff (1.9 KB) - added by AaronCampbell 7 years ago.

Download all attachments as: .zip

Change History (4)

#1 @ryan
7 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [10245]) Allow overriding cat walker. Props AaronCampbell. fixes #8682 for 2.7.

#2 @ryan
7 years ago

(In [10246]) Allow overriding cat walker. Props AaronCampbell. fixes #8682 for trunk

#3 @ryan
7 years ago

  • Milestone changed from 2.8 to 2.7.1
Note: See TracTickets for help on using tickets.