WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#9304 closed defect (bug) (fixed)

Allow plugins to modify class value in page lists

Reported by: wnorris Owned by:
Milestone: 2.8 Priority: normal
Severity: normal Version: 2.8
Component: UI Keywords: has-patch
Focuses: Cc:

Description

This patch adds a new filter 'page_css_class' which allows plugins to modify the class values included for each page retrieved via wp_list_pages().

Attachments (2)

page_css_class.diff (1.7 KB) - added by wnorris 5 years ago.
page_css_class-2.diff (657 bytes) - added by wnorris 5 years ago.

Download all attachments as: .zip

Change History (4)

wnorris5 years ago

wnorris5 years ago

comment:1 wnorris5 years ago

  • Cc wnorris added

attaching alternate solution, which is more consistent with how this is done in other parts of WordPress... instead of changing $css_class to be an array, leave it as a string, then explode it just for the purposes of passing into the filter. Take yer pick.

comment:2 westi5 years ago

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

(In [10814]) Allow a plugin to filter the classes applied in wp_list_pages. Fixes #9304 props willnorris.

Note: See TracTickets for help on using tickets.