Changeset 4048
- Timestamp:
- 09/13/2016 06:25:56 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-term-subscription/inc/class-plugin.php
r4005 r4048 59 59 */ 60 60 public function term_subscribe_handler( $action = '' ) { 61 if ( ! $this->taxonomy ) {62 return;63 }64 65 // Taxonomy mismatch; a different instance should handle this.66 if ( $this->taxonomy != $_GET['taxonomy'] ) {67 return;68 }69 70 if ( ! bbp_is_subscriptions_active() ) {71 return false;72 }73 74 61 // Bail if the actions aren't meant for this function. 75 62 if ( ! in_array( $action, self::get_valid_actions() ) ) { … … 77 64 } 78 65 66 if ( ! $this->taxonomy ) { 67 return; 68 } 69 70 // Taxonomy mismatch; a different instance should handle this. 71 if ( ! isset( $_GET['taxonomy'] ) || $this->taxonomy != $_GET['taxonomy'] ) { 72 return; 73 } 74 75 if ( ! bbp_is_subscriptions_active() ) { 76 return false; 77 } 78 79 // Bail if the actions aren't meant for this function. 80 if ( ! in_array( $action, self::get_valid_actions() ) ) { 81 return; 82 } 83 79 84 // Bail if no term id is passed. 80 if ( empty( $_GET['term_id'] ) || empty( $_GET['taxonomy'] ) ) {85 if ( ! isset( $_GET['term_id'] ) || empty( $_GET['term_id'] ) ) { 81 86 return; 82 87 } … … 160 165 } 161 166 167 // Remove the author from being notified of their own topic. 168 $this->subscribers = array_diff( $this->subscribers, array( bbp_get_topic_author_id( $topic_id ) ) ); 169 162 170 if ( empty( $this->subscribers ) ) { 163 171 return; … … 252 260 $this->subscribers = array_diff( $this->subscribers, $topic_subscribers ); 253 261 } 262 263 // Remove the author from being notified of their own reply. 264 $this->subscribers = array_diff( $this->subscribers, array( bbp_get_reply_author_id( $reply_id ) ) ); 254 265 255 266 if ( empty( $this->subscribers ) ) {
Note: See TracChangeset
for help on using the changeset viewer.