PluginProbe
bbPress / 2.6.19
bbPress v2.6.19
2.6.19 2.6.18 2.6.17 trunk 2.0 2.0-beta-1 2.0-beta-2b 2.0-beta-3 2.0-beta-3b 2.0-rc-2 2.0-rc-3 2.0-rc-4 2.0-rc-5 2.0.1 2.0.2 2.0.3 2.1 2.1-beta-1 2.1-rc1 2.1-rc2 2.1-rc3 2.1-rc4 2.1.1 2.1.2 2.1.3 All 74 releases
← All changes | includes/admin/forums.php +25 -20 2.6.18 → 2.6.19 View file →
@@ -15,9 +15,9 @@
15 15 * Loads bbPress forums admin area
16 16 *
17 17 * @package bbPress
18 18 * @subpackage Administration
19 - * @since 2.0.0 bbPress (r2464)
19 + * @since 2.0.0 bbPress (r3095)
20 20 */
21 21 class BBP_Forums_Admin {
22 22
23 23 /** Variables *************************************************************/
@@ -31,9 +31,9 @@
31 31
32 32 /**
33 33 * The main bbPress forums admin loader
34 34 *
35 - * @since 2.0.0 bbPress (r2515)
35 + * @since 2.0.0 bbPress (r3095)
36 36 */
37 37 public function __construct() {
38 38 $this->setup_globals();
39 39 $this->setup_actions();
@@ -41,9 +41,9 @@
41 41
42 42 /**
43 43 * Setup the admin hooks, actions and filters
44 44 *
45 - * @since 2.0.0 bbPress (r2646)
45 + * @since 2.0.0 bbPress (r3376)
46 46 *
47 47 * @access private
48 48 */
49 49 private function setup_actions() {
@@ -77,9 +77,9 @@
77 77
78 78 /**
79 79 * Admin globals
80 80 *
81 - * @since 2.0.0 bbPress (r2646)
81 + * @since 2.0.0 bbPress (r3376)
82 82 *
83 83 * @access private
84 84 */
85 85 private function setup_globals() {
@@ -90,9 +90,9 @@
90 90
91 91 /**
92 92 * Contextual help for bbPress forum edit page
93 93 *
94 - * @since 2.0.0 bbPress (r3119)
94 + * @since 2.1.0 bbPress (r3686)
95 95 */
96 96 public function edit_help() {
97 97
98 98 // Overview
@@ -157,9 +157,9 @@
157 157
158 158 /**
159 159 * Contextual help for bbPress forum edit page
160 160 *
161 - * @since 2.0.0 bbPress (r3119)
161 + * @since 2.1.0 bbPress (r3686)
162 162 */
163 163 public function new_help() {
164 164
165 165 $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>';
@@ -221,9 +221,9 @@
221 221
222 222 /**
223 223 * Add the forum attributes meta-box
224 224 *
225 - * @since 2.0.0 bbPress (r2746)
225 + * @since 2.0.0 bbPress (r3097)
226 226 */
227 227 public function attributes_metabox() {
228 228
229 229 // Bail if the current user cannot edit forum structure
@@ -243,9 +243,9 @@
243 243
244 244 /**
245 245 * Add the forum moderators meta-box
246 246 *
247 - * @since 2.6.0 bbPress
247 + * @since 2.6.0 bbPress (r6056)
248 248 */
249 249 public function moderators_metabox() {
250 250
251 251 // Bail if feature not active or user cannot assign moderators
@@ -308,9 +308,9 @@
308 308
309 309 /**
310 310 * Pass the forum attributes for processing
311 311 *
312 - * @since 2.0.0 bbPress (r2746)
312 + * @since 2.6.0 bbPress (r6056)
313 313 *
314 314 * @param int $forum_id Forum id
315 315 * @return int Forum id
316 316 */
@@ -504,9 +504,9 @@
504 504
505 505 /**
506 506 * Returns an array of keys used to sort row actions
507 507 *
508 - * @since 2.6.0 bbPress (r6771)
508 + * @since 2.6.0 bbPress (r6772)
509 509 *
510 510 * @return array
511 511 */
512 512 private function get_row_action_sort_order() {
@@ -513,9 +513,9 @@
513 513
514 514 /**
515 515 * Filters the row action sort order.
516 516 *
517 - * @since 2.6.0 bbPress (r6771)
517 + * @since 2.6.0 bbPress (r6772)
518 518 *
519 519 * @param array $order The default sort order.
520 520 */
521 521 return (array) apply_filters(
@@ -533,9 +533,9 @@
533 533
534 534 /**
535 535 * Returns an array of notice toggles
536 536 *
537 - * @since 2.6.0 bbPress (r6396)
537 + * @since 2.6.0 bbPress (r6397)
538 538 *
539 539 * @return array
540 540 */
541 541 private function get_allowed_notice_toggles() {
@@ -552,9 +552,9 @@
552 552
553 553 /**
554 554 * Returns an array of notice toggles
555 555 *
556 - * @since 2.6.0 bbPress (r6396)
556 + * @since 2.6.0 bbPress (r6397)
557 557 *
558 558 * @return array
559 559 */
560 560 private function get_allowed_action_toggles() {
@@ -561,9 +561,9 @@
561 561
562 562 /**
563 563 * Filters the allowed action toggles.
564 564 *
565 - * @since 2.6.0 bbPress (r6396)
565 + * @since 2.6.0 bbPress (r6397)
566 566 *
567 567 * @param array $toggles The default action toggles.
568 568 */
569 569 return apply_filters(
@@ -576,9 +576,9 @@
576 576
577 577 /**
578 578 * Manage the column headers for the forums page
579 579 *
580 - * @since 2.0.0 bbPress (r2485)
580 + * @since 2.0.0 bbPress (r3097)
581 581 *
582 582 * @param array $columns The columns
583 583 *
584 584 * @return array $columns bbPress forum columns
@@ -608,9 +608,9 @@
608 608
609 609 /**
610 610 * Print extra columns for the forums page
611 611 *
612 - * @since 2.0.0 bbPress (r2485)
612 + * @since 2.0.0 bbPress (r3097)
613 613 *
614 614 * @param string $column Column
615 615 * @param int $forum_id Forum id
616 616 */
@@ -666,9 +666,9 @@
666 666 *
667 667 * Remove the quick-edit action link and display the description under
668 668 * the forum title and add the open/close links
669 669 *
670 - * @since 2.0.0 bbPress (r2577)
670 + * @since 2.0.0 bbPress (r3097)
671 671 *
672 672 * @param array $actions Actions
673 673 * @param object $forum Forum object
674 674 *
@@ -715,9 +715,9 @@
715 715
716 716 /**
717 717 * Sort row actions by key
718 718 *
719 - * @since 2.6.0
719 + * @since 2.6.0 bbPress (r6772)
720 720 *
721 721 * @param array $actions
722 722 *
723 723 * @return array
@@ -744,9 +744,9 @@
744 744
745 745 /**
746 746 * Custom user feedback messages for forum post type
747 747 *
748 - * @since 2.0.0 bbPress (r3080)
748 + * @since 2.0.0 bbPress (r3097)
749 749 *
750 750 * @global int $post_ID
751 751 *
752 752 * @param array $messages
@@ -840,13 +840,18 @@
840 840 *
841 841 * This is currently here to make hooking and unhooking of the admin UI easy.
842 842 * It could use dependency injection in the future, but for now this is easier.
843 843 *
844 - * @since 2.0.0 bbPress (r2596)
844 + * @since 2.0.0 bbPress (r3343)
845 845 *
846 846 * @param WP_Screen $current_screen Current screen object
847 847 */
848 848 function bbp_admin_forums( $current_screen ) {
849 +
850 + // Bail if not in site admin
851 + if ( ! is_blog_admin() ) {
852 + return;
853 + }
849 854
850 855 // Bail if not a forum screen
851 856 if ( empty( $current_screen->post_type ) || ( bbp_get_forum_post_type() !== $current_screen->post_type ) ) {
852 857 return;