Changeset 10640
- Timestamp:
- 02/03/2021 05:51:21 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-moderators.php
r10610 r10640 33 33 add_filter( 'bbp_after_has_topics_parse_args', array( $this, 'add_post_status_to_query' ) ); 34 34 add_filter( 'bbp_after_has_replies_parse_args', array( $this, 'add_post_status_to_query' ) ); 35 add_filter( 'bbp_is_topic_pending', array( $this, 'archived_is_pending_topic' ), 10, 2 ); 35 36 36 37 // Adjust the list of admin links for topics and replies. … … 1038 1039 update_post_meta( $post_id, self::MODERATOR_META, wp_get_current_user()->user_nicename ); 1039 1040 } 1041 1042 /** 1043 * Treat the archived status as a pending status to ensure that bbp_get_reply_url() doesn't slash a non-pretty url. 1044 * 1045 * @param bool $topic_status Whether the topic is pending. 1046 * @param int $topic_id The topic ID. 1047 * @return bool 1048 */ 1049 public function archived_is_pending_topic( $topic_status, $topic_id ) { 1050 if ( 1051 ! $topic_status && 1052 ( bbp_get_topic_status( $topic_id ) === self::ARCHIVED ) 1053 ) { 1054 $topic_status = true; 1055 } 1056 1057 return $topic_status; 1058 } 1040 1059 }
Note: See TracChangeset
for help on using the changeset viewer.