WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 7 years ago

Last modified 7 years ago

#17071 closed enhancement (fixed)

wp_count_attachments() is not filterable

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

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

Download all attachments as: .zip

Change History (7)

#1 @kevinB
10 years ago

  • Cc kevin@… added

#2 @nacin
10 years ago

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

@kevinB
10 years ago

[updated] filter return value of wp_count_attachments()

#3 @c3mdigital
8 years ago

  • Keywords needs-refresh added
  • Version set to 2.5

#4 @nacin
7 years ago

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

#5 @nacin
7 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
7 years ago

In 25581:

Use correct variable. props helen. see #17071.

Note: See TracTickets for help on using tickets.