Ticket #8682 (closed defect (bug): fixed)

Opened 3 years ago

Last modified 2 years ago

Missing capability to override Walker_Cat*

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

Description

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

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

Change History

comment:1   ryan3 years ago

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

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

comment:2   ryan3 years ago

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

comment:3   ryan3 years ago

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