Making WordPress.org


Ignore:
Timestamp:
02/18/2022 03:02:37 AM (3 years ago)
Author:
dd32
Message:

Support Forums: Add unsubscription links to plugin/theme/tag subscription emails.

Note: This does not add unsubscription links to bbPress emails, only the ones this plugin adds.
Emails from bbPress for forum / topic subscription ('notify me of replies') will not have these links.

See #5505, #3456.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-stats.php

    r11562 r11580  
    3333
    3434        bump_stats_extra( 'wporg-support', $action . '-' . $type );
     35
     36        // Tokenised links are from email unsubscribe links, record these in duplicate.
     37        if ( isset( $_GET['token'] ) ) {
     38            $type .= '_email';
     39            if ( isset( $_POST['List-Unsubscribe'] ) && 'One-Click' === $_POST['List-Unsubscribe'] ) {
     40                $type .= '_oneclick';
     41            }
     42
     43            bump_stats_extra( 'wporg-support', $action . '-' . $type );
     44        }
     45       
    3546    }
    3647
Note: See TracChangeset for help on using the changeset viewer.