Changeset 4070 for branches/plugin/bbp-admin/bbp-forums.php
- Timestamp:
- 07/08/2012 08:55:34 AM (14 years ago)
- File:
-
- 1 edited
-
branches/plugin/bbp-admin/bbp-forums.php (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-admin/bbp-forums.php
r4053 r4070 39 39 * @uses BBP_Forums_Admin::setup_help() Setup the help text 40 40 */ 41 function __construct() {41 public function __construct() { 42 42 $this->setup_globals(); 43 43 $this->setup_actions(); … … 56 56 * @uses bbp_get_reply_post_type() To get the reply post type 57 57 */ 58 function setup_actions() {58 private function setup_actions() { 59 59 60 60 // Add some general styling to the admin area … … 81 81 82 82 /** 83 * Should we bail out of this method? 84 * 85 * @since bbPress (r4067) 86 * @return boolean 87 */ 88 private function bail() { 89 if ( $this->post_type != get_current_screen()->post_type ) 90 return true; 91 92 return false; 93 } 94 95 /** 83 96 * Admin globals 84 97 * … … 86 99 * @access private 87 100 */ 88 function setup_globals() { 89 90 // Setup the post type for this admin component 101 private function setup_globals() { 91 102 $this->post_type = bbp_get_forum_post_type(); 92 103 } … … 101 112 */ 102 113 public function edit_help() { 114 115 if ( $this->bail() ) return; 103 116 104 117 // Overview … … 164 177 public function new_help() { 165 178 179 if ( $this->bail() ) return; 180 166 181 $customize_display = '<p>' . __( 'The title field and the big forum editing Area are fixed in place, but you can reposition all the other boxes using drag and drop, and can minimize or expand them by clicking the title bar of each box. Use the Screen Options tab to unhide more boxes (Excerpt, Send Trackbacks, Custom Fields, Discussion, Slug, Author) or to choose a 1- or 2-column layout for this screen.', 'bbpress' ) . '</p>'; 167 182 … … 234 249 * @uses do_action() Calls 'bbp_forum_attributes_metabox' 235 250 */ 236 function attributes_metabox() { 251 public function attributes_metabox() { 252 253 if ( $this->bail() ) return; 254 237 255 add_meta_box ( 238 256 'bbp_forum_attributes', … … 269 287 * @return int Forum id 270 288 */ 271 function attributes_metabox_save( $forum_id ) { 289 public function attributes_metabox_save( $forum_id ) { 290 291 if ( $this->bail() ) return $forum_id; 272 292 273 293 // Bail if doing an autosave … … 312 332 * @uses do_action() Calls 'bbp_admin_head' 313 333 */ 314 function admin_head() { 334 public function admin_head() { 335 336 if ( $this->bail() ) return; 337 315 338 ?> 316 339 … … 388 411 * @return array $columns bbPress forum columns 389 412 */ 390 function column_headers( $columns ) { 413 public function column_headers( $columns ) { 414 415 if ( $this->bail() ) return $columns; 416 391 417 $columns = array ( 392 418 'cb' => '<input type="checkbox" />', … … 419 445 * column and forum id 420 446 */ 421 function column_data( $column, $forum_id ) { 447 public function column_data( $column, $forum_id ) { 448 449 if ( $this->bail() ) return; 450 422 451 switch ( $column ) { 423 452 case 'bbp_forum_topic_count' : … … 465 494 * @return array $actions Actions 466 495 */ 467 function row_actions( $actions, $forum ) { 496 public function row_actions( $actions, $forum ) { 497 498 if ( $this->bail() ) return $actions; 499 468 500 unset( $actions['inline hide-if-no-js'] ); 469 501 … … 489 521 * @return array 490 522 */ 491 function updated_messages( $messages ) {523 public function updated_messages( $messages ) { 492 524 global $post_ID; 525 526 if ( $this->bail() ) return $messages; 493 527 494 528 // URL for the current forum … … 556 590 */ 557 591 function bbp_admin_forums() { 558 global $typenow;559 560 if ( bbp_get_forum_post_type() != $typenow )561 return;562 563 592 bbpress()->admin->forums = new BBP_Forums_Admin(); 564 593 }
Note: See TracChangeset
for help on using the changeset viewer.