Changeset 6197 for trunk/src/includes/admin/topics.php
- Timestamp:
- 12/29/2016 04:25:54 AM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/includes/admin/topics.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/topics.php
r6190 r6197 81 81 82 82 // Topic metabox actions 83 add_action( 'add_meta_boxes', array( $this, 'attributes_metabox' ) ); 84 add_action( 'add_meta_boxes', array( $this, 'author_metabox' ) ); 85 add_action( 'add_meta_boxes', array( $this, 'replies_metabox' ) ); 86 add_action( 'add_meta_boxes', array( $this, 'comments_metabox' ) ); 87 add_action( 'save_post', array( $this, 'save_meta_boxes' ) ); 83 add_action( 'add_meta_boxes', array( $this, 'attributes_metabox' ) ); 84 add_action( 'add_meta_boxes', array( $this, 'author_metabox' ) ); 85 add_action( 'add_meta_boxes', array( $this, 'replies_metabox' ) ); 86 add_action( 'add_meta_boxes', array( $this, 'favorites_metabox' ) ); 87 add_action( 'add_meta_boxes', array( $this, 'subscriptions_metabox' ) ); 88 add_action( 'add_meta_boxes', array( $this, 'comments_metabox' ) ); 89 add_action( 'save_post', array( $this, 'save_meta_boxes' ) ); 88 90 89 91 // Check if there are any bbp_toggle_topic_* requests on admin_init, also have a message displayed … … 343 345 */ 344 346 public function attributes_metabox() { 345 346 347 add_meta_box( 347 348 'bbp_topic_attributes', … … 352 353 'high' 353 354 ); 354 355 do_action( 'bbp_topic_attributes_metabox' );356 355 } 357 356 … … 361 360 * @since 2.0.0 bbPress (r2828) 362 361 * 363 * @uses bbp_get_topic() To get the topic364 * @uses bbp_get_reply() To get the reply365 * @uses bbp_get_topic_post_type() To get the topic post type366 * @uses bbp_get_reply_post_type() To get the reply post type367 362 * @uses add_meta_box() To add the metabox 368 * @uses do_action() Calls 'bbp_author_metabox' with the topic/reply369 * id370 363 */ 371 364 public function author_metabox() { … … 385 378 'high' 386 379 ); 387 388 do_action( 'bbp_author_metabox', get_the_ID() );389 380 } 390 381 … … 421 412 'high' 422 413 ); 423 424 do_action( 'bbp_topic_replies_metabox', get_the_ID() ); 414 } 415 416 /** 417 * Add the favorites metabox 418 * 419 * Allows viewing of users who have favorited a topic. 420 * 421 * @since 2.6.0 bbPress (r6179) 422 * 423 * @uses add_meta_box() To add the metabox 424 */ 425 public function favorites_metabox() { 426 427 // Bail if post_type is not a reply 428 if ( empty( $_GET['action'] ) || ( 'edit' !== $_GET['action'] ) ) { 429 return; 430 } 431 432 // Bail if no favorites 433 if ( ! bbp_is_favorites_active() ) { 434 return; 435 } 436 437 // Add the metabox 438 add_meta_box( 439 'bbp_topic_favorites_metabox', 440 __( 'Favorites', 'bbpress' ), 441 'bbp_topic_favorites_metabox', 442 $this->post_type, 443 'normal', 444 'high' 445 ); 446 } 447 448 /** 449 * Add the subscriptions metabox 450 * 451 * Allows viewing of users who have subscribed to a topic. 452 * 453 * @since 2.6.0 bbPress (r6179) 454 * 455 * @uses add_meta_box() To add the metabox 456 */ 457 public function subscriptions_metabox() { 458 459 // Bail if post_type is not a reply 460 if ( empty( $_GET['action'] ) || ( 'edit' !== $_GET['action'] ) ) { 461 return; 462 } 463 464 // Bail if no subscriptions 465 if ( ! bbp_is_subscriptions_active() ) { 466 return; 467 } 468 469 // Add the metabox 470 add_meta_box( 471 'bbp_topic_subscriptions_metabox', 472 __( 'Subscriptions', 'bbpress' ), 473 'bbp_topic_subscriptions_metabox', 474 $this->post_type, 475 'normal', 476 'high' 477 ); 425 478 } 426 479
Note: See TracChangeset
for help on using the changeset viewer.