WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#4703 closed enhancement (fixed)

Add classes to the Page and Category Walkers

Reported by: Otto42 Owned by:
Milestone: 2.3 Priority: low
Severity: normal Version: 2.3
Component: Optimization Keywords: has-patch
Focuses: Cc:

Description

Walker_Page needs an ID specific class to allow users to customize the look of links produced by it based on the specific page being linked to. Several users have requested such a thing on the support forums, and the only way to do it is by hacking the core code: http://wordpress.org/support/topic/104396

Similarly, the Walker_Category could use some better classes, such as a general cat_item class as well as a cat_item_ID class.

Patch attched to do both of these.

Attachments (1)

walker-classes.diff (1.4 KB) - added by Otto42 7 years ago.
Adds classes for page and category items

Download all attachments as: .zip

Change History (5)

Otto427 years ago

Adds classes for page and category items

comment:1 ryan7 years ago

Use dashes instead of underscores for the new classes and it's fine by me.

comment:2 Otto427 years ago

Why dashes instead of underscores? Is there a difference other than stylistic?

comment:4 ryan7 years ago

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

(In [5920]) Add cat-item-id and page-item-id classes. Props Otto42. fixes #4703

Note: See TracTickets for help on using tickets.