apply_filters ( 'jetpack_subscriptions_exclude_all_categories_except', array $args )

ONLY send subscription emails for these categories<p>Will ONLY send subscription emails to these categories.</p>

Source file: modules/subscriptions.php

View in GitHub

Parameters

$args

(array) Array of category slugs or ID’s.


Changelog

Since: Jetpack 3.7.0


Notes

If you’d rather not send any subscription emails by default, you can use the jetpack_subscriptions_exclude_all_categories_except filter.

In the example below, we only send subscription emails if our post belongs to the “VaultPress” or “Akismet” category:

function jetpackme_exclude_all_posts_subscriptions_except( $categories ) {
    $categories = array( 'vaultpress', 'akismet');
    return $categories;
}
add_filter( 'jetpack_subscriptions_exclude_all_categories_except', 'jetpackme_exclude_all_posts_subscriptions_except' );

Have a note to contribute?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s