Changeset 6197 for trunk/src/includes/admin/forums.php
- Timestamp:
- 12/29/2016 04:25:54 AM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/includes/admin/forums.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/forums.php
r6190 r6197 73 73 74 74 // Metabox actions 75 add_action( 'add_meta_boxes', array( $this, 'attributes_metabox' ) ); 76 add_action( 'add_meta_boxes', array( $this, 'moderators_metabox' ) ); 77 add_action( 'add_meta_boxes', array( $this, 'comments_metabox' ) ); 78 add_action( 'save_post', array( $this, 'save_meta_boxes' ) ); 75 add_action( 'add_meta_boxes', array( $this, 'attributes_metabox' ) ); 76 add_action( 'add_meta_boxes', array( $this, 'moderators_metabox' ) ); 77 add_action( 'add_meta_boxes', array( $this, 'subscriptions_metabox' ) ); 78 add_action( 'add_meta_boxes', array( $this, 'comments_metabox' ) ); 79 add_action( 'save_post', array( $this, 'save_meta_boxes' ) ); 79 80 80 81 // Check if there are any bbp_toggle_forum_* requests on admin_init, also have a message displayed … … 229 230 */ 230 231 public function attributes_metabox() { 231 232 // Meta data233 232 add_meta_box( 234 233 'bbp_forum_attributes', … … 239 238 'high' 240 239 ); 241 242 do_action( 'bbp_forum_attributes_metabox' );243 240 } 244 241 … … 268 265 'high' 269 266 ); 270 271 do_action( 'bbp_forum_moderators_metabox' ); 267 } 268 269 /** 270 * Add the subscriptions metabox 271 * 272 * Allows viewing of users who have subscribed to a forum. 273 * 274 * @since 2.6.0 bbPress (r6179) 275 * 276 * @uses add_meta_box() To add the metabox 277 */ 278 public function subscriptions_metabox() { 279 280 // Bail if post_type is not a reply 281 if ( empty( $_GET['action'] ) || ( 'edit' !== $_GET['action'] ) ) { 282 return; 283 } 284 285 // Bail if no subscriptions 286 if ( ! bbp_is_subscriptions_active() ) { 287 return; 288 } 289 290 // Add the metabox 291 add_meta_box( 292 'bbp_forum_subscriptions_metabox', 293 __( 'Subscriptions', 'bbpress' ), 294 'bbp_forum_subscriptions_metabox', 295 $this->post_type, 296 'normal', 297 'high' 298 ); 272 299 } 273 300
Note: See TracChangeset
for help on using the changeset viewer.