Changeset 3703
- Timestamp:
- 07/21/2016 01:32:40 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
r3666 r3703 42 42 */ 43 43 public function bbp_loaded() { 44 // Display the form depending on context 44 // Change the topic title when resolved. 45 add_filter( 'bbp_get_topic_title', array( $this, 'get_topic_title' ), 10, 2 ); 46 47 // Display the form for new/edited topics. 45 48 add_action( 'bbp_theme_before_topic_form_content', array( $this, 'form_topic_resolution_dropdown' ) ); 46 49 add_action( 'bbp_theme_before_topic_form_subscriptions', array( $this, 'form_topic_resolution_checkbox' ) ); 47 50 48 // Process field submission 51 // Process field submission for topics. 49 52 add_action( 'bbp_new_topic_post_extras', array( $this, 'topic_post_extras' ) ); 50 53 add_action( 'bbp_edit_topic_post_extras', array( $this, 'topic_post_extras' ) ); 51 54 52 // Admin interface for enabling on forums55 // Indicate if the forum is a support forum. 53 56 add_filter( 'manage_forum_posts_columns', array( $this, 'add_forum_topic_resolution_column' ), 11 ); 54 57 add_action( 'manage_forum_posts_custom_column', array( $this, 'add_forum_topic_resolution_value' ), 10, 2 ); … … 56 59 // Process field submission 57 60 // @todo Bulk actions aren't filterable, so this might be hacky. 61 } 62 63 /** 64 * Add "Resolved" status to title. 65 */ 66 public function get_topic_title( $title, $topic_id ) { 67 $resolved = __( 'Resolved', 'wporg' ); 68 if ( 'yes' == $this->get_topic_resolution( array( 'id' => $topic_id ) ) ) { 69 return sprintf( esc_html( '[%s]: %s' ), $resolved, $title ); 70 } 71 return $title; 58 72 } 59 73
Note: See TracChangeset
for help on using the changeset viewer.