Changeset 3985
- Timestamp:
- 09/07/2016 01:47:19 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-topic-resolution/inc/class-plugin.php
r3905 r3985 65 65 */ 66 66 public function get_topic_title( $title, $topic_id ) { 67 // Only run when enabled on a topic's forum. 68 if ( ! $this->is_enabled_on_forum( bbp_get_topic_forum_id( $topic_id ) ) ) { 69 return $title; 70 } 71 67 72 $resolved = __( 'Resolved', 'wporg-forums' ); 68 73 if ( 'yes' == $this->get_topic_resolution( array( 'id' => $topic_id ) ) ) { … … 328 333 329 334 public function is_enabled_on_forum( $forum_id = 0 ) { 330 // @todo Make this actually check the option; for testing, 'true' is okay 331 return true; 332 333 $forum = bbp_get_forum( $forum_id ); 334 if ( empty( $forum ) ) { 335 return; 336 } 337 338 $enabled = $this->get_enabled_forums(); 339 if ( $enabled && in_array( $forum_id, $enabled ) ) { 340 return true; 341 } 342 return false; 335 return apply_filters( 'wporg_bbp_topic_resolution_is_enabled_on_forum', true, $forum_id ); 343 336 } 344 337
Note: See TracChangeset
for help on using the changeset viewer.