Changeset 5656
- Timestamp:
- 03/24/2015 09:15:40 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/topics/functions.php
r5637 r5656 2792 2792 $topic->post_status = bbp_get_closed_status_id(); 2793 2793 2794 // No revisions 2795 remove_action( 'pre_post_update', 'wp_save_post_revision' ); 2794 // Toggle revisions off as we are not altering content 2795 if ( post_type_supports( bbp_get_topic_post_type(), 'revisions' ) ) { 2796 $revisions_removed = true; 2797 remove_post_type_support( bbp_get_topic_post_type(), 'revisions' ); 2798 } 2796 2799 2797 2800 // Update topic 2798 2801 $topic_id = wp_update_post( $topic ); 2802 2803 // Toggle revisions back on 2804 if ( true === $revisions_removed ) { 2805 $revisions_removed = false; 2806 add_post_type_support( bbp_get_topic_post_type(), 'revisions' ); 2807 } 2799 2808 2800 2809 // Execute post close code … … 2849 2858 delete_post_meta( $topic_id, '_bbp_status' ); 2850 2859 2851 // No revisions 2852 remove_action( 'pre_post_update', 'wp_save_post_revision' ); 2860 // Toggle revisions off as we are not altering content 2861 if ( post_type_supports( bbp_get_topic_post_type(), 'revisions' ) ) { 2862 $revisions_removed = true; 2863 remove_post_type_support( bbp_get_topic_post_type(), 'revisions' ); 2864 } 2853 2865 2854 2866 // Update topic 2855 2867 $topic_id = wp_update_post( $topic ); 2868 2869 // Toggle revisions back on 2870 if ( true === $revisions_removed ) { 2871 $revisions_removed = false; 2872 add_post_type_support( bbp_get_topic_post_type(), 'revisions' ); 2873 } 2856 2874 2857 2875 // Execute post open code
Note: See TracChangeset
for help on using the changeset viewer.