Changeset 6918
- Timestamp:
- 11/05/2019 08:28:43 PM (4 years ago)
- Location:
- trunk/src/includes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/metaboxes.php
r6914 r6918 732 732 733 733 /** 734 * See who subscribed to a topic734 * See who is subscribed to a topic 735 735 * 736 736 * @since 2.6.0 bbPress (r6197) … … 772 772 773 773 /** 774 * See who subscribed to a forum774 * See who is subscribed to a forum 775 775 * 776 776 * @since 2.6.0 bbPress (r6197) -
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 } -
trunk/src/includes/topics/functions.php
r6915 r6918 798 798 // Handle Subscription Checkbox 799 799 if ( bbp_is_subscriptions_active() && ! empty( $author_id ) ) { 800 801 // Check if subscribed 800 802 $subscribed = bbp_is_user_subscribed( $author_id, $topic_id ); 803 804 // Check for action 801 805 $subscheck = ( ! empty( $_POST['bbp_topic_subscription'] ) && ( 'bbp_subscribe' === $_POST['bbp_topic_subscription'] ) ) 802 806 ? true … … 804 808 805 809 // Subscribed and unsubscribing 806 if ( true === $subscribed && false === $subscheck) {810 if ( ( true === $subscribed ) && ( false === $subscheck ) ) { 807 811 bbp_remove_user_subscription( $author_id, $topic_id ); 808 812 809 // Subscribing810 } elseif ( false === $subscribed && true === $subscheck) {813 // Not subscribed and subscribing 814 } elseif ( ( false === $subscribed ) && ( true === $subscheck ) ) { 811 815 bbp_add_user_subscription( $author_id, $topic_id ); 812 816 }
Note: See TracChangeset
for help on using the changeset viewer.