How do I modify the plugin so that the topics are auto closed after 30 minutes
-
I hope that it is appropriate to ask this question here. (WordPress 4.9.8, bbPress 2.5.14, Theme:TwentyTen)
I hope that one of my forums can automatically close the topics after 30 minutes.
I read this discussion (https://bbpress.org/forums/topic/auto-close-topic-after-some-time-days/) and tried to modify it myself, but I failed.
Later I found a plugin called BBP Close Old Topics (https://wordpress.org/plugins/bbp-close-old-topics/).
I tried to modify it myself, but in the end it can only be automatically close the topics after one day.
I guess… is this the problem with these code?// Get timestamp of last activity of the topic. $last_active = strtotime( get_post_field( 'post_date', bbp_get_topic_last_active_id( $topic_id ) ) ); // Compare last active timestamp with defined time period. if ( $last_active < strtotime( '-' . $this->old_topic_age_setting() . 'days' ) ) :
Is there something missing here that the command can only catch D (day) and not catch i (minute)?
I’m at my wits’ end with this issue……Thank you so much.
- You must be logged in to reply to this topic.