Changeset 6918 for trunk/src/includes/replies/functions.php
- Timestamp:
- 11/05/2019 08:28:43 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/replies/functions.php
r6855 r6918 826 826 // Handle Subscription Checkbox 827 827 if ( bbp_is_subscriptions_active() && ! empty( $author_id ) && ! empty( $topic_id ) ) { 828 829 // Check if subscribed 828 830 $subscribed = bbp_is_user_subscribed( $author_id, $topic_id ); 829 $subscheck = ( ! empty( $_POST['bbp_topic_subscription'] ) && ( 'bbp_subscribe' === $_POST['bbp_topic_subscription'] ) ) ? true : false; 831 832 // Check for action 833 $subscheck = ( ! empty( $_POST['bbp_topic_subscription'] ) && ( 'bbp_subscribe' === $_POST['bbp_topic_subscription'] ) ) 834 ? true 835 : false; 830 836 831 837 // Subscribed and unsubscribing 832 if ( true === $subscribed && false === $subscheck) {838 if ( ( true === $subscribed ) && ( false === $subscheck ) ) { 833 839 bbp_remove_user_subscription( $author_id, $topic_id ); 834 840 835 // Subscribing836 } elseif ( false === $subscribed && true === $subscheck) {841 // Not subscribed and subscribing 842 } elseif ( ( false === $subscribed ) && ( true === $subscheck ) ) { 837 843 bbp_add_user_subscription( $author_id, $topic_id ); 838 844 }
Note: See TracChangeset
for help on using the changeset viewer.