Changeset 6830 for trunk/src/includes/forums/template.php
- Timestamp:
- 07/05/2018 04:11:03 PM (8 years ago)
- File:
-
- 1 edited
-
trunk/src/includes/forums/template.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/forums/template.php
r6829 r6830 2227 2227 function bbp_get_form_forum_subscribed() { 2228 2228 2229 // Default value 2230 $forum_subscribed = false; 2231 2229 2232 // Get _POST data 2230 2233 if ( bbp_is_forum_form_post_request() && isset( $_POST['bbp_forum_subscription'] ) ) { … … 2233 2236 // Get edit data 2234 2237 } elseif ( bbp_is_forum_edit() || bbp_is_reply_edit() ) { 2235 2236 // Get current posts author 2237 $post_author = (int) bbp_get_global_post_field( 'post_author', 'raw' ); 2238 2239 // Post author is not the current user 2240 if ( bbp_get_current_user_id() !== $post_author ) { 2241 $forum_subscribed = bbp_is_user_subscribed( $post_author, bbp_get_forum_id() ); 2242 2243 // Post author is the current user 2244 } else { 2245 $forum_subscribed = bbp_is_user_subscribed( bbp_get_current_user_id(), bbp_get_forum_id() ); 2246 } 2238 $post_author = (int) bbp_get_global_post_field( 'post_author', 'raw' ); 2239 $forum_subscribed = bbp_is_user_subscribed( $post_author, bbp_get_forum_id() ); 2247 2240 2248 2241 // Get current status 2249 2242 } elseif ( bbp_is_single_forum() ) { 2250 2243 $forum_subscribed = bbp_is_user_subscribed( bbp_get_current_user_id(), bbp_get_forum_id() ); 2251 2252 // No data2253 } else {2254 $forum_subscribed = false;2255 2244 } 2256 2245
Note: See TracChangeset
for help on using the changeset viewer.