WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 2126 | /** |
| 2127 | * Modify returned post counts by status for the current post type. |
| 2128 | * |
| 2129 | * @since 3.7.0 |
| 2130 | * |
| 2131 | * @param object $counts An object containing the current post_type's post counts by status. |
| 2132 | * @param string $type The post type. |
| 2133 | * @param string $perm The permission to determine if the posts are 'readable' by the current user. |
| 2134 | */ |
| 2135 | return apply_filters( 'wp_count_posts', $counts, $type, $perm ); |
| 2136 | } |
| 2137 | |
| 2138 | /** |
| 2139 | * Count number of attachments for the mime type(s). |
| 2140 | * |
| 2141 | * If you set the optional mime_type parameter, then an array will still be |
| 2142 | * returned, but will only have the item you are looking for. It does not give |
| 2143 | * you the number of attachments that are children of a post. You can get that |
| 2144 | * by counting the number of children that post has. |