Make WordPress Core

Opened 13 years ago

Closed 11 years ago

Last modified 11 years ago

#17071 closed enhancement (fixed)

wp_count_attachments() is not filterable

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


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 13 years ago.
[updated] filter return value of wp_count_attachments()

Download all attachments as: .zip

Change History (7)

#1 @kevinB
13 years ago

  • Cc kevin@… added

#2 @nacin
13 years ago

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

13 years ago

[updated] filter return value of wp_count_attachments()

#3 @c3mdigital
11 years ago

  • Keywords needs-refresh added
  • Version set to 2.5

#4 @nacin
11 years ago

  • Milestone changed from Awaiting Review to 3.7
  • Owner set to nacin
  • Status changed from new to accepted

#5 @nacin
11 years ago

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

In 25579:

Introduce a wp_count_attachments filter.

props kevinB.
fixes #17071.

#6 @nacin
11 years ago

In 25581:

Use correct variable. props helen. see #17071.

Note: See TracTickets for help on using tickets.