WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 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:

Description

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 7 years ago.
adds filter to wp_widget_pages function

Download all attachments as: .zip

Change History (8)

@scompt7 years ago

adds filter to wp_widget_pages function

comment:1 @scompt7 years ago

  • Keywords has-patch added

comment:2 @jeremyclarke7 years ago

  • Cc jeremyclarke added
  • Keywords tested added

+1

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

comment:3 @ryan7 years ago

  • Component changed from General to Widgets
  • Owner anonymous deleted

comment:4 @FFEMTcJ6 years ago

  • Milestone changed from 2.7.2 to 2.8

Postponing enhancements to 2.8

comment:5 @ryan6 years ago

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

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

comment:6 @janeforshort6 years ago

  • Milestone changed from 2.8 to Future Release

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

comment:7 @Denis-de-Bernardy6 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.