wp_count_attachments WordPress Filter Hook

The wp_count_attachments hook is used to return the number of attachments for a given post.

apply_filters( 'wp_count_attachments', stdClass $counts, string|string[] $mime_type ) #

Modify returned attachment counts by mime type.


Parameters

$counts

(stdClass)An object containing the attachment counts by mime type.

$mime_type

(string|string[])Array or comma-separated list of MIME patterns.


Top ↑

Source

File: wp-includes/post.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.7.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More