Ticket #7431: 7431.01.patch
File 7431.01.patch, 1.7 KB (added by , 8 years ago) |
---|
-
src/bp-core/bp-core-functions.php
3668 3668 * @since 2.7.0 3669 3669 */ 3670 3670 function bp_email_unsubscribe_handler() { 3671 $emails = bp_email_get_ type_schema( 'all');3671 $emails = bp_email_get_unsubscribe_type_schema(); 3672 3672 $raw_email_type = ! empty( $_GET['nt'] ) ? $_GET['nt'] : ''; 3673 3673 $raw_hash = ! empty( $_GET['nh'] ) ? $_GET['nh'] : ''; 3674 3674 $raw_user_id = ! empty( $_GET['uid'] ) ? absint( $_GET['uid'] ) : 0; … … 3749 3749 * @return string The unsubscribe link. 3750 3750 */ 3751 3751 function bp_email_get_unsubscribe_link( $args ) { 3752 $emails = bp_email_get_ type_schema( 'all');3752 $emails = bp_email_get_unsubscribe_type_schema(); 3753 3753 3754 3754 if ( empty( $args['notification_type'] ) || ! array_key_exists( $args['notification_type'], $emails ) ) { 3755 3755 return site_url( 'wp-login.php' ); … … 3792 3792 function bp_email_get_salt() { 3793 3793 return bp_get_option( 'bp-emails-unsubscribe-salt', null ); 3794 3794 } 3795 3796 /** 3797 * Get a list of emails for use in our unsubscribe functions. 3798 * 3799 * @since x.x.x 3800 * 3801 * @see https://buddypress.trac.wordpress.org/ticket/7431 3802 * 3803 * @return array The array of email types and their schema. 3804 */ 3805 function bp_email_get_unsubscribe_type_schema() { 3806 $emails = bp_email_get_type_schema( 'all' ); 3807 3808 /** 3809 * Filters the return of `bp_email_get_type_schema( 'all' )` for use with 3810 * our unsubscribe functionality. 3811 * 3812 * @since x.x.x 3813 * 3814 * @param array $emails The array of email types and their schema. 3815 */ 3816 return (array) apply_filters( 'bp_email_get_unsubscribe_type_schema', $emails ); 3817 }