Changeset 4426 for trunk/includes/replies/functions.php
- Timestamp:
- 11/16/2012 02:07:37 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/replies/functions.php
r4331 r4426 365 365 * @uses bbp_has_errors() To get the {@link WP_Error} errors 366 366 * @uses wp_save_post_revision() To save a reply revision 367 * @uses bbp_update_ topic_revision_log() To update the reply revision log367 * @uses bbp_update_reply_revision_log() To update the reply revision log 368 368 * @uses wp_update_post() To update the reply 369 369 * @uses bbp_get_reply_topic_id() To get the reply topic id … … 387 387 388 388 // Define local variable(s) 389 $revisions_removed = false; 389 390 $reply = $reply_id = $reply_author = $topic_id = $forum_id = $anonymous_data = 0; 390 391 $reply_title = $reply_content = $reply_edit_reason = $terms = ''; … … 548 549 ) ); 549 550 550 // Insert reply 551 // Toggle revisions to avoid duplicates 552 if ( post_type_supports( bbp_get_topic_post_type(), 'revisions' ) ) { 553 $revisions_removed = true; 554 remove_post_type_support( bbp_get_topic_post_type(), 'revisions' ); 555 } 556 557 // Insert topic 551 558 $reply_id = wp_update_post( $reply_data ); 559 560 // Toggle revisions back on 561 if ( true === $revisions_removed ) { 562 $revisions_removed = true; 563 add_post_type_support( bbp_get_topic_post_type(), 'revisions' ); 564 } 552 565 553 566 /** Topic Tags ************************************************************/ … … 572 585 // Update revision log 573 586 if ( !empty( $_POST['bbp_log_reply_edit'] ) && ( 1 == $_POST['bbp_log_reply_edit'] ) ) { 574 $revision_id = wp_ save_post_revision( $reply_id );587 $revision_id = wp_is_post_revision( $reply_id ); 575 588 if ( !empty( $revision_id ) ) { 576 589 bbp_update_reply_revision_log( array(
Note: See TracChangeset
for help on using the changeset viewer.