Make WordPress Core

Opened 18 years ago

Closed 18 years ago

#3402 closed enhancement (fixed)

Add global filter for wp_list_pages excludes

Reported by: markjaquith's profile markjaquith Owned by: markjaquith's profile markjaquith
Milestone: 2.1 Priority: normal
Severity: normal Version: 2.1
Component: General Keywords: has-patch 2nd-opinion
Focuses: Cc:

Description

Currently, the only way to reliably exclude pages from wp_list_pages() is to use the exclude query param in each instance of the function. Not user-friendly, as it requires template editing.

There should be a global filter for this. I'll write the patch in a bit.

The filter should probably pass an array of pages already excluded via the exclude= method, and then plugins can just $excludes[] = 34; return $excludes; and we'll implode()

Attachments (1)

wp_list_pages_excludes.diff (889 bytes) - added by markjaquith 18 years ago.
patch for trunk

Download all attachments as: .zip

Change History (4)

@markjaquith
18 years ago

patch for trunk

#1 @markjaquith
18 years ago

  • Keywords has-patch 2nd-opinion added
  • Status changed from new to assigned

Patch is up. Will let it sit for a bit, so speak now.

#2 @ryan
18 years ago

Kool with a K, which is kooler than cool.

#3 @markjaquith
18 years ago

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

(In [4586]) global exclude filter for wp_list_pages(). fixes #3402

Note: See TracTickets for help on using tickets.