Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#8845 closed enhancement (duplicate)

Adds filter to Pages widget to allow extended configuration

Reported by: scompt Owned by:
Milestone: Priority: normal
Severity: minor Version: 2.7
Component: Widgets Keywords: widgets plugin needs-patch
Focuses: Cc:


In a couple WordPress installs, I've wanted to use the Pages widget to display the page navigation in the sidebar, but only wanted to go down a certain depth. Unfortunately, the widget doesn't support that option of wp_list_pages, so I've either resorted to copying the code to my functions.php file and modifying it or installing one of the plugins that been developed to fill the need. Either way, it seems a bit heavy-handed for a simple "depth=1".

This patch adds a filter to the wp_widget_pages function. This is identical to the existing filter in the wp_widget_links function.

wp-hackers discussion

Attachments (1)

wp_widget_pages_filter.diff (563 bytes) - added by scompt 9 years ago.
adds filter to wp_widget_pages function

Download all attachments as: .zip

Change History (8)

9 years ago

adds filter to wp_widget_pages function

#1 @scompt
9 years ago

  • Keywords has-patch added

#2 @jeremyclarke
9 years ago

  • Cc jeremyclarke added
  • Keywords tested added


I like the idea and tested teh patch and it works fine. The filter name is ugly but matches the widgets_links_args one.

#3 @ryan
9 years ago

  • Component changed from General to Widgets
  • Owner anonymous deleted

9 years ago

  • Milestone changed from 2.7.2 to 2.8

Postponing enhancements to 2.8

#5 @ryan
9 years ago

  • Keywords needs-patch added; has-patch tested removed

Patch needs refresh. Widgets moved to default-widgets.php.

#6 @janeforshort
9 years ago

  • Milestone changed from 2.8 to Future Release

Punting to be evaluated in next development cycle due to time constraints.

#7 @Denis-de-Bernardy
9 years ago

  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed

See #9780

Note: See TracTickets for help on using tickets.