Changeset 6791 for trunk/src/includes/topics/functions.php
- Timestamp:
- 03/29/2018 06:03:12 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/topics/functions.php
r6790 r6791 2736 2736 2737 2737 // Get previous topic status meta 2738 $status = bbp_get_closed_status_id(); 2738 2739 $topic_status = get_post_meta( $topic_id, '_bbp_status', true ); 2739 2740 2740 2741 // Bail if already closed and topic status meta exists 2741 if ( bbp_get_closed_status_id()=== $topic->post_status && ! empty( $topic_status ) ) {2742 if ( $status === $topic->post_status && ! empty( $topic_status ) ) { 2742 2743 return false; 2743 2744 } 2744 2745 2745 2746 // Set status meta public 2746 $topic_status = bbp_get_public_status_id();2747 $topic_status = $topic->post_status; 2747 2748 2748 2749 // Execute pre close code … … 2753 2754 2754 2755 // Set closed status 2755 $topic->post_status = bbp_get_closed_status_id();2756 $topic->post_status = $status; 2756 2757 2757 2758 // Toggle revisions off as we are not altering content … … 3171 3172 3172 3173 // Set publish status 3173 $topic->post_status = bbp_get_public_status_id();3174 $topic->post_status = $status; 3174 3175 3175 3176 // No revisions … … 3205 3206 $status = bbp_get_pending_status_id(); 3206 3207 3207 // Bail if already pending3208 if ( $status === $topic->post_status) {3208 // Bail if already unapproved 3209 if ( ! bbp_is_topic_public( $topic_id ) ) { 3209 3210 return false; 3210 3211 }
Note: See TracChangeset
for help on using the changeset viewer.