jetpack_widget_authors_post_types
Filter types of posts that will be counted in the widget.
Description
Parameters (1)
- 0. $default_post_type (string|array)
- Type(s) of posts to count for the widget.
Usage
- To run the hook, copy the example below.
- $default_post_type = apply_filters( 'jetpack_widget_authors_post_types', $default_post_type );
- if ( !empty( $default_post_type ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the jetpack_widget_authors_post_types callback
- function filter_jetpack_widget_authors_post_types( $default_post_type ) {
- // make filter magic happen here...
- return $default_post_type;
- };
- // add the filter
- add_filter( 'jetpack_widget_authors_post_types', 'filter_jetpack_widget_authors_post_types', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'jetpack_widget_authors_post_types', 'filter_jetpack_widget_authors_post_types', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /modules/widgets/authors.php
- $post_types = apply_filters( 'jetpack_widget_authors_post_types', $default_post_type );