Plugin Directory

Changeset 1917027


Ignore:
Timestamp:
07/30/2018 06:27:16 PM (8 years ago)
Author:
Digital Arm
Message:

1.2.1 hotfix

Location:
moderation-tools-for-bbpress
Files:
20 added
3 edited

Legend:

Unmodified
Added
Removed
  • moderation-tools-for-bbpress/trunk/incs/moderation.php

    r1914199 r1917027  
    239239                $forum_id = bbp_get_topic_forum_id( $topic_id );
    240240
     241                $bbp_reply_count = get_post_meta( $topic_id, '_bbp_reply_count', true );
     242                $bbp_last_reply_id = get_post_meta( $topic_id, '_bbp_last_reply_id', true );
     243                $bbp_last_active_id = get_post_meta( $topic_id, '_bbp_last_active_id', true );
     244                $bbp_last_active_time = get_post_meta( $topic_id, '_bbp_last_active_time', time );
     245
    241246                do_action( 'bbp_approved_reply', $post->ID );
    242247                do_action( 'bbp_new_reply', $post->ID, $topic_id, $forum_id );
     248
     249                // If this isn't the last reply, reset topic freshness to previous state
     250                if ( $post->menu_order != $bbp_reply_count ) {
     251                    update_post_meta( $topic_id, '_bbp_last_reply_id', $bbp_last_reply_id );
     252                    update_post_meta( $topic_id, '_bbp_last_active_id', $bbp_last_active_id );
     253                    update_post_meta( $topic_id, '_bbp_last_active_time', $bbp_last_active_time );
     254                }
    243255            }
    244256
  • moderation-tools-for-bbpress/trunk/moderation-tools-bbpress.php

    r1914199 r1917027  
    44Description: Extends the basic bbPress moderation tools to give you more control over your Forum.
    55Author: Digital Arm
    6 Version: 1.2.0
     6Version: 1.2.1
    77Author URI: https://www.digitalarm.co.uk
    88*/
  • moderation-tools-for-bbpress/trunk/readme.txt

    r1914199 r1917027  
    44Requires at least: 4.0
    55Tested up to: 4.9.7
    6 Stable tag: 1.2.0
     6Stable tag: 1.2.1
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5555
    5656== Changelog ==
     57
     58= 1.2.1 =
     59* Updated reply approval so topic freshness is only changed if the reply is the latest
    5760
    5861= 1.2.0 =
Note: See TracChangeset for help on using the changeset viewer.