Make WordPress Core

Opened 15 years ago

Closed 13 years ago

Last modified 13 years ago

#17071 closed enhancement (fixed)

wp_count_attachments() is not filterable

Reported by: kevinB Owned by: nacin
Priority: normal Milestone: 3.7
Component: Media Version: 2.5
Severity: normal Keywords: has-patch needs-refresh
Cc: Focuses:

Description

The Media Library attachments listing and edit links can be filtered via existing WP_Query and has_cap hooks. However, corresponding attachment counts are not cleanly filterable.

Attachments (1)

17071.diff (461 bytes ) - added by kevinB 15 years ago.
[updated] filter return value of wp_count_attachments()

Download all attachments as: .zip

Change History (7)

#1 @kevinB
15 years ago

  • Cc kevin@… added

#2 @nacin
15 years ago

Please create a diff from the checkout root. There are three different post.php files in core. :-)

@kevinB
15 years ago

[updated] filter return value of wp_count_attachments()

#3 @c3mdigital
13 years ago

  • Keywords needs-refresh added
  • Version2.5

#4 @nacin
13 years ago

  • Milestone Awaiting Review3.7
  • Owner set to nacin
  • Status newaccepted

#5 @nacin
13 years ago

  • Resolutionfixed
  • Status acceptedclosed

In 25579:

Introduce a wp_count_attachments filter.

props kevinB.
fixes #17071.

#6 @nacin
13 years ago

In 25581:

Use correct variable. props helen. see #17071.

Note: See TracTickets for help on using tickets.