Ticket #4132: 4132-meta.patch
File 4132-meta.patch, 1.1 KB (added by , 6 years ago) |
---|
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-report-topic.php
98 98 } 99 99 100 100 public function add_sidebar_link() { 101 101 102 // We don't want to allow anonymous users to report topics, we want to track who reports them. 102 103 if ( ! is_user_logged_in() ) { 103 104 return; 104 105 } 105 106 107 // Disallow closed support topics to be modlook reported after 6 months. 108 $last_active_post_date = get_post_field( 'post_date', bbp_get_topic_last_active_id( $topic_id ) ); 109 110 if ( ( time() - strtotime( $last_active_post_date ) ) / MONTH_IN_SECONDS >= 6 ) { 111 return; 112 } 113 106 114 $current_user = get_current_user_id(); 107 115 $previous_reports = $this->get_previous_reports(); 108 116 $is_reported = has_term( 'modlook', 'topic-tag', bbp_get_topic_id() );