|
@@ 188-191 (lines=4) @@
|
| 185 |
|
*/ |
| 186 |
|
$excluded_categories = apply_filters( 'jetpack_subscriptions_exclude_these_categories', array() ); |
| 187 |
|
// Never email posts from these categories |
| 188 |
|
if ( ! empty( $excluded_categories ) && in_category( $excluded_categories, $post->ID ) ) { |
| 189 |
|
update_post_meta( $post->ID, '_jetpack_dont_email_post_to_subs', 1 ); |
| 190 |
|
$email_subscribers = false; |
| 191 |
|
} |
| 192 |
|
/** |
| 193 |
|
* ONLY send subscription emails for these categories |
| 194 |
|
* |
|
@@ 206-209 (lines=4) @@
|
| 203 |
|
$only_these_categories = apply_filters( 'jetpack_subscriptions_exclude_all_categories_except', array() ); |
| 204 |
|
|
| 205 |
|
// Only emails posts from these categories |
| 206 |
|
if ( ! empty( $only_these_categories ) && ! in_category( $only_these_categories, $post->ID ) ) { |
| 207 |
|
update_post_meta( $post->ID, '_jetpack_dont_email_post_to_subs', 1 ); |
| 208 |
|
$email_subscribers = false; |
| 209 |
|
} |
| 210 |
|
|
| 211 |
|
// Email the post, depending on the checkbox option |
| 212 |
|
if ( ! empty( $_POST['disable_subscribe_nonce'] ) && wp_verify_nonce( $_POST['disable_subscribe_nonce'], 'disable_subscribe' ) ) { |