top_ten_posts_post_types
Filter the post_types passed to the query.
Type: filter
Since: 2.2.0
Source: includes/class-top-ten-core-query.php line 274
Changelog
| Version | Description |
|---|---|
3.0.0 |
Changed second argument from post ID to $args. |
2.2.0 |
Introduced. |
Parameters
| Type | Name | Description |
|---|---|---|
array |
$post_types |
Array of post types to filter by. |
array |
$args |
Arguments array. |
Usage
add_filter( 'top_ten_posts_post_types', function($post_types, $args) {
// ...
return $post_types;
} );