Make WordPress Core

Opened 13 years ago

Closed 10 years ago

#17022 closed enhancement (fixed)

months_dropdown() is not filterable

Reported by: kevinb's profile kevinB Owned by: drewapicture's profile DrewAPicture
Milestone: 3.7 Priority: normal
Severity: normal Version:
Component: Query Keywords: has-patch
Focuses: Cc:

Description

The months_dropdown() function used on the Edit Posts and Media Library listing forms is not filterable. This causes invalid month items when a plugin uses the WP_Query API to filter editable posts.

The corresponding patch adds the query filter 'months_dropdown_query'

Attachments (4)

months_dropdown_3.2.patch (745 bytes) - added by kevinB 13 years ago.
query filter for months_dropdown()
17022.diff (816 bytes) - added by wonderboymusic 11 years ago.
17022.2.diff (1.0 KB) - added by DrewAPicture 11 years ago.
filter docs
17022.3.diff (718 bytes) - added by DrewAPicture 10 years ago.
results filter

Download all attachments as: .zip

Change History (13)

@kevinB
13 years ago

query filter for months_dropdown()

#1 @scribu
13 years ago

Related: #17025

#2 @scribu
13 years ago

  • Summary changed from Edit Posts / Media Library: add hook for months_dropdown() to months_dropdown() is not filterable

#3 @wonderboymusic
11 years ago

  • Milestone changed from Awaiting Review to 3.7

Slightly altered the style of the patch. The filter seems like a reasonable request.

#4 @wonderboymusic
11 years ago

  • Keywords needs-docs added

There's a new filter

@DrewAPicture
11 years ago

filter docs

#5 @DrewAPicture
11 years ago

  • Keywords needs-docs removed

17022.2.diff adds a docblock for the months_dropdown_query filter hook.

#6 @nacin
11 years ago

See my reservations about filtering SQL directly in #17025. Can we filter what the SQL returns instead?

#7 @wonderboymusic
10 years ago

  • Keywords needs-refresh added

see @nacin's comment - needs alternate filter approach

@DrewAPicture
10 years ago

results filter

#8 @DrewAPicture
10 years ago

  • Keywords needs-refresh removed

17022.3.diff instead filters the results re: comment:6. Includes filter docs.

#9 @DrewAPicture
10 years ago

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

In 25556:

Make the WP_List_Table::months_dropdown() query results filterable.

Introduces the months_dropdown_results filter.

Fixes #17022.

Note: See TracTickets for help on using tickets.