PluginProbe
bbPress / 2.6.17
bbPress v2.6.17
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 2.2 2.2.1 All 72 releases
bbpress / includes / admin / tools.php

tools.php in bbPress 2.6.17, at includes/admin/tools.php

626 lines 20.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * bbPress Admin Tools Page
5 *
6 * @package bbPress
7 * @subpackage Administration
8 */
9
10 // Exit if accessed directly
11 defined( 'ABSPATH' ) || exit;
12
13 /**
14 * Output a bbPress specific tools box
15 *
16 * @since 2.6.0 bbPress (r6273)
17 */
18 function bbp_admin_tools_box() {
19
20 // Bail if user cannot access tools page
21 if ( ! current_user_can( 'bbp_tools_page' ) ) {
22 return;
23 }
24
25 // Get the tools pages
26 $links = array();
27 $tools = bbp_get_tools_admin_pages(); ?>
28
29 <div class="card">
30 <h3 class="title"><?php esc_html_e( 'Forums', 'bbpress' ); ?></h3>
31 <p><?php esc_html_e( 'bbPress provides the following tools to help you manage your forums:', 'bbpress' ); ?></p>
32
33 <?php
34
35 // Loop through tools and create links
36 foreach ( $tools as $tool ) {
37
38 // Skip if user cannot see this page
39 if ( ! current_user_can( $tool['cap'] ) ) {
40 continue;
41 }
42
43 // Add link to array
44 $links[] = sprintf( '<a href="%s">%s</a>', esc_url( add_query_arg( array( 'page' => $tool['page'] ), admin_url( 'tools.php' ) ) ), $tool['name'] );
45 }
46
47 // Output links
48 echo '<p class="bbp-tools-links">' . implode( ' &middot; ', $links ) . '</p>';
49
50 ?></div>
51
52 <?php
53 }
54
55 /**
56 * Register an admin area repair tool
57 *
58 * @since 2.6.0 bbPress (r5885)
59 *
60 * @param array $args
61 * @return
62 */
63 function bbp_register_repair_tool( $args = array() ) {
64
65 // Parse arguments
66 $r = bbp_parse_args(
67 $args,
68 array(
69 'id' => '',
70 'type' => '',
71 'title' => '',
72 'description' => '',
73 'callback' => '',
74 'priority' => 0,
75 'overhead' => 'low',
76 'version' => '',
77 'components' => array(),
78
79 // @todo
80 'success' => esc_html__( 'The repair was completed successfully', 'bbpress' ),
81 'failure' => esc_html__( 'The repair was not successful', 'bbpress' )
82 ),
83 'register_repair_tool'
84 );
85
86 // Bail if missing required values
87 if ( empty( $r['id'] ) || empty( $r['priority'] ) || empty( $r['title'] ) || empty( $r['callback'] ) ) {
88 return;
89 }
90
91 // Add tool to the registered tools array
92 bbp_admin()->tools[ $r['id'] ] = array(
93 'type' => $r['type'],
94 'title' => $r['title'],
95 'description' => $r['description'],
96 'priority' => $r['priority'],
97 'callback' => $r['callback'],
98 'overhead' => $r['overhead'],
99 'components' => $r['components'],
100 'version' => $r['version'],
101
102 // @todo
103 'success' => $r['success'],
104 'failure' => $r['failure'],
105 );
106 }
107
108 /**
109 * Register the default repair tools
110 *
111 * @since 2.6.0 bbPress (r5885)
112 */
113 function bbp_register_default_repair_tools() {
114
115 // Topic meta
116 bbp_register_repair_tool(
117 array(
118 'id' => 'bbp-sync-topic-meta',
119 'type' => 'repair',
120 'title' => esc_html__( 'Recalculate parent topic for each reply', 'bbpress' ),
121 'description' => esc_html__( 'Run this if replies appear in the wrong topics.', 'bbpress' ),
122 'callback' => 'bbp_admin_repair_topic_meta',
123 'priority' => 5,
124 'overhead' => 'low',
125 'components' => array( bbp_get_reply_post_type() )
126 )
127 );
128
129 // Forum meta
130 bbp_register_repair_tool(
131 array(
132 'id' => 'bbp-sync-forum-meta',
133 'type' => 'repair',
134 'title' => esc_html__( 'Recalculate parent forum for each topic and reply', 'bbpress' ),
135 'description' => esc_html__( 'Run this if topics or replies appear in the wrong forums.', 'bbpress' ),
136 'callback' => 'bbp_admin_repair_forum_meta',
137 'priority' => 10,
138 'overhead' => 'low',
139 'components' => array( bbp_get_topic_post_type(), bbp_get_reply_post_type() )
140 )
141 );
142
143 // Forum visibility
144 bbp_register_repair_tool(
145 array(
146 'id' => 'bbp-sync-forum-visibility',
147 'type' => 'repair',
148 'title' => esc_html__( 'Recalculate private and hidden forums', 'bbpress' ),
149 'description' => esc_html__( 'Run this if non-public forums are publicly visible.', 'bbpress' ),
150 'callback' => 'bbp_admin_repair_forum_visibility',
151 'priority' => 15,
152 'overhead' => 'low',
153 'components' => array( bbp_get_forum_post_type() )
154 )
155 );
156
157 // Sync all topics in all forums
158 bbp_register_repair_tool(
159 array(
160 'id' => 'bbp-sync-all-topics-forums',
161 'type' => 'repair',
162 'title' => esc_html__( 'Recalculate last activity in each topic and forum', 'bbpress' ),
163 'description' => esc_html__( 'Run this if freshness appears incorrectly.', 'bbpress' ),
164 'callback' => 'bbp_admin_repair_freshness',
165 'priority' => 20,
166 'overhead' => 'high',
167 'components' => array( bbp_get_forum_post_type(), bbp_get_topic_post_type(), bbp_get_reply_post_type() )
168 )
169 );
170
171 // Sync all sticky topics in all forums
172 bbp_register_repair_tool(
173 array(
174 'id' => 'bbp-sync-all-topics-sticky',
175 'type' => 'repair',
176 'title' => esc_html__( 'Recalculate sticky relationship of each topic', 'bbpress' ),
177 'description' => esc_html__( 'Run this if sticky topics appear incorrectly.', 'bbpress' ),
178 'callback' => 'bbp_admin_repair_sticky',
179 'priority' => 25,
180 'overhead' => 'low',
181 'components' => array( bbp_get_topic_post_type() )
182 )
183 );
184
185 // Sync all hierarchical reply positions
186 bbp_register_repair_tool(
187 array(
188 'id' => 'bbp-sync-all-reply-positions',
189 'type' => 'repair',
190 'title' => esc_html__( 'Recalculate position of each reply in each topic', 'bbpress' ),
191 'description' => esc_html__( 'Run this if replies appear in the wrong order.', 'bbpress' ),
192 'callback' => 'bbp_admin_repair_reply_menu_order',
193 'priority' => 30,
194 'overhead' => 'high',
195 'components' => array( bbp_get_reply_post_type() )
196 )
197 );
198
199 // Sync all topic engagements for all users
200 bbp_register_repair_tool(
201 array(
202 'id' => 'bbp-topic-engagements',
203 'type' => 'repair',
204 'title' => esc_html__( 'Recalculate engagements in each topic for each user', 'bbpress' ),
205 'description' => esc_html__( 'Run this if voices appear incorrectly.', 'bbpress' ),
206 'callback' => 'bbp_admin_repair_topic_voice_count',
207 'priority' => 35,
208 'overhead' => 'high',
209 'components' => array( bbp_get_topic_post_type(), bbp_get_user_rewrite_id() )
210 )
211 );
212
213 // Update closed topic counts
214 bbp_register_repair_tool(
215 array(
216 'id' => 'bbp-sync-closed-topics',
217 'type' => 'repair',
218 'title' => esc_html__( 'Repair closed topic statuses', 'bbpress' ),
219 'description' => esc_html__( 'Run this if closed topics appear incorrectly.', 'bbpress' ),
220 'callback' => 'bbp_admin_repair_closed_topics',
221 'priority' => 40,
222 'overhead' => 'medium',
223 'components' => array( bbp_get_topic_post_type() )
224 )
225 );
226
227 // Count topics
228 bbp_register_repair_tool(
229 array(
230 'id' => 'bbp-forum-topics',
231 'type' => 'repair',
232 'title' => esc_html__( 'Recount topics in each forum', 'bbpress' ),
233 'description' => esc_html__( 'Run this if the number of topics in any forums are incorrect.', 'bbpress' ),
234 'callback' => 'bbp_admin_repair_forum_topic_count',
235 'priority' => 45,
236 'overhead' => 'medium',
237 'components' => array( bbp_get_forum_post_type(), bbp_get_topic_post_type() )
238 )
239 );
240
241 // Count topic tags
242 bbp_register_repair_tool(
243 array(
244 'id' => 'bbp-topic-tags',
245 'type' => 'repair',
246 'title' => esc_html__( 'Recount topics in each topic-tag', 'bbpress' ),
247 'description' => esc_html__( 'Run this if the number of topics in any topic-tags are incorrect.', 'bbpress' ),
248 'callback' => 'bbp_admin_repair_topic_tag_count',
249 'priority' => 50,
250 'overhead' => 'medium',
251 'components' => array( bbp_get_topic_post_type(), bbp_get_topic_tag_tax_id() )
252 )
253 );
254
255 // Count forum replies
256 bbp_register_repair_tool(
257 array(
258 'id' => 'bbp-forum-replies',
259 'type' => 'repair',
260 'title' => esc_html__( 'Recount replies in each forum', 'bbpress' ),
261 'description' => esc_html__( 'Run this if the number of replies in any forums are incorrect.', 'bbpress' ),
262 'callback' => 'bbp_admin_repair_forum_reply_count',
263 'priority' => 55,
264 'overhead' => 'high',
265 'components' => array( bbp_get_forum_post_type(), bbp_get_reply_post_type() )
266 )
267 );
268
269 // Count non-published replies to each forum
270 bbp_register_repair_tool(
271 array(
272 'id' => 'bbp-forum-hidden-replies',
273 'type' => 'repair',
274 'title' => esc_html__( 'Recount pending, spammed, and trashed replies in each forum', 'bbpress' ),
275 'description' => esc_html__( 'Run this if non-public replies display incorrectly in forums.', 'bbpress' ),
276 'callback' => 'bbp_admin_repair_forum_hidden_reply_count',
277 'priority' => 60,
278 'overhead' => 'high',
279 'components' => array( bbp_get_forum_post_type(), bbp_get_reply_post_type() )
280 )
281 );
282
283 // Count topic replies
284 bbp_register_repair_tool(
285 array(
286 'id' => 'bbp-topic-replies',
287 'type' => 'repair',
288 'title' => esc_html__( 'Recount replies in each topic', 'bbpress' ),
289 'description' => esc_html__( 'Run this if the number of replies in any topics are incorrect.', 'bbpress' ),
290 'callback' => 'bbp_admin_repair_topic_reply_count',
291 'priority' => 65,
292 'overhead' => 'high',
293 'components' => array( bbp_get_topic_post_type(), bbp_get_reply_post_type() )
294 )
295 );
296
297 // Count non-published replies to each topic
298 bbp_register_repair_tool(
299 array(
300 'id' => 'bbp-topic-hidden-replies',
301 'type' => 'repair',
302 'title' => esc_html__( 'Recount pending, spammed, and trashed replies in each topic', 'bbpress' ),
303 'description' => esc_html__( 'Run this if non-public replies display incorrectly in topics.', 'bbpress' ),
304 'callback' => 'bbp_admin_repair_topic_hidden_reply_count',
305 'priority' => 70,
306 'overhead' => 'high',
307 'components' => array( bbp_get_topic_post_type(), bbp_get_reply_post_type() )
308 )
309 );
310
311 // Recount topics for each user
312 bbp_register_repair_tool(
313 array(
314 'id' => 'bbp-user-topics',
315 'type' => 'repair',
316 'title' => esc_html__( 'Recount topics for each user', 'bbpress' ),
317 'description' => esc_html__( 'Run this to get fresh topic counts for all users.', 'bbpress' ),
318 'callback' => 'bbp_admin_repair_user_topic_count',
319 'priority' => 75,
320 'overhead' => 'medium',
321 'components' => array( bbp_get_topic_post_type(), bbp_get_user_rewrite_id() )
322 )
323 );
324
325 // Recount topics for each user
326 bbp_register_repair_tool(
327 array(
328 'id' => 'bbp-user-replies',
329 'type' => 'repair',
330 'title' => esc_html__( 'Recount replies for each user', 'bbpress' ),
331 'description' => esc_html__( 'Run this to get fresh reply counts for all users.', 'bbpress' ),
332 'callback' => 'bbp_admin_repair_user_reply_count',
333 'priority' => 80,
334 'overhead' => 'medium',
335 'components' => array( bbp_get_reply_post_type(), bbp_get_user_rewrite_id() )
336 )
337 );
338
339 // Remove unpublished topics from user favorites
340 bbp_register_repair_tool(
341 array(
342 'id' => 'bbp-user-favorites',
343 'type' => 'repair',
344 'title' => esc_html__( 'Remove unpublished topics from user favorites', 'bbpress' ),
345 'description' => esc_html__( 'Run this to remove trashed or deleted topics from all user favorites.', 'bbpress' ),
346 'callback' => 'bbp_admin_repair_user_favorites',
347 'priority' => 85,
348 'overhead' => 'medium',
349 'components' => array( bbp_get_topic_post_type(), bbp_get_user_rewrite_id() )
350 )
351 );
352
353 // Remove unpublished topics from user subscriptions
354 bbp_register_repair_tool(
355 array(
356 'id' => 'bbp-user-topic-subscriptions',
357 'type' => 'repair',
358 'title' => esc_html__( 'Remove unpublished topics from user subscriptions', 'bbpress' ),
359 'description' => esc_html__( 'Run this to remove trashed or deleted topics from all user subscriptions.', 'bbpress' ),
360 'callback' => 'bbp_admin_repair_user_topic_subscriptions',
361 'priority' => 90,
362 'overhead' => 'medium',
363 'components' => array( bbp_get_topic_post_type(), bbp_get_user_rewrite_id() )
364 )
365 );
366
367 // Remove unpublished forums from user subscriptions
368 bbp_register_repair_tool(
369 array(
370 'id' => 'bbp-user-forum-subscriptions',
371 'type' => 'repair',
372 'title' => esc_html__( 'Remove unpublished forums from user subscriptions', 'bbpress' ),
373 'description' => esc_html__( 'Run this to remove trashed or deleted forums from all user subscriptions.', 'bbpress' ),
374 'callback' => 'bbp_admin_repair_user_forum_subscriptions',
375 'priority' => 95,
376 'overhead' => 'medium',
377 'components' => array( bbp_get_forum_post_type(), bbp_get_user_rewrite_id() )
378 )
379 );
380
381 // Remove unpublished forums from user subscriptions
382 bbp_register_repair_tool(
383 array(
384 'id' => 'bbp-user-role-map',
385 'type' => 'repair',
386 'title' => esc_html__( 'Remap all users to default forum roles', 'bbpress' ),
387 'description' => esc_html__( 'Run this if users have issues accessing the forums.', 'bbpress' ),
388 'callback' => 'bbp_admin_repair_user_roles',
389 'priority' => 100,
390 'overhead' => 'low',
391 'components' => array( bbp_get_user_rewrite_id() )
392 )
393 );
394
395 // Migrate topic engagements to post-meta
396 bbp_register_repair_tool(
397 array(
398 'id' => 'bbp-user-topic-engagements-move',
399 'type' => 'upgrade',
400 'title' => esc_html__( 'Upgrade user topic engagements', 'bbpress' ),
401 'description' => esc_html__( 'Copies engagements from user meta to topic meta.', 'bbpress' ),
402 'callback' => 'bbp_admin_upgrade_user_engagements',
403 'priority' => 105,
404 'version' => '2.6.0',
405 'overhead' => 'high',
406 'components' => array( bbp_get_user_rewrite_id(), bbp_get_user_engagements_rewrite_id() )
407 )
408 );
409
410 // Migrate favorites from user-meta to post-meta
411 bbp_register_repair_tool(
412 array(
413 'id' => 'bbp-user-favorites-move',
414 'type' => 'upgrade',
415 'title' => esc_html__( 'Upgrade user topic favorites', 'bbpress' ),
416 'description' => esc_html__( 'Copies favorites from user meta to topic meta.', 'bbpress' ),
417 'callback' => 'bbp_admin_upgrade_user_favorites',
418 'priority' => 110,
419 'version' => '2.6.0',
420 'overhead' => 'high',
421 'components' => array( bbp_get_user_rewrite_id(), bbp_get_user_favorites_rewrite_id() )
422 )
423 );
424
425 // Migrate topic subscriptions from user-meta to post-meta
426 bbp_register_repair_tool(
427 array(
428 'id' => 'bbp-user-topic-subscriptions-move',
429 'type' => 'upgrade',
430 'title' => esc_html__( 'Upgrade user topic subscriptions', 'bbpress' ),
431 'description' => esc_html__( 'Copies topic subscriptions from user meta to topic meta.', 'bbpress' ),
432 'callback' => 'bbp_admin_upgrade_user_topic_subscriptions',
433 'priority' => 115,
434 'version' => '2.6.0',
435 'overhead' => 'high',
436 'components' => array( bbp_get_user_rewrite_id(), bbp_get_user_subscriptions_rewrite_id() )
437 )
438 );
439
440 // Migrate forum subscriptions from user-meta to post-meta
441 bbp_register_repair_tool(
442 array(
443 'id' => 'bbp-user-forum-subscriptions-move',
444 'type' => 'upgrade',
445 'title' => esc_html__( 'Upgrade user forum subscriptions', 'bbpress' ),
446 'description' => esc_html__( 'Copies forum subscriptions from user meta to forum meta.', 'bbpress' ),
447 'callback' => 'bbp_admin_upgrade_user_forum_subscriptions',
448 'priority' => 120,
449 'version' => '2.6.0',
450 'overhead' => 'high',
451 'components' => array( bbp_get_user_rewrite_id(), bbp_get_user_subscriptions_rewrite_id() )
452 )
453 );
454
455 // Remove favorites from user-meta
456 bbp_register_repair_tool(
457 array(
458 'id' => 'bbp-user-favorites-delete',
459 'type' => 'upgrade',
460 'title' => esc_html__( 'Remove favorites from user-meta', 'bbpress' ),
461 'description' => esc_html__( 'Run this to delete old data (after confirming successful favorites upgrade)', 'bbpress' ),
462 'callback' => 'bbp_admin_upgrade_remove_favorites_from_usermeta',
463 'priority' => 125,
464 'version' => '2.6.1',
465 'overhead' => 'medium',
466 'components' => array( bbp_get_user_rewrite_id(), bbp_get_user_favorites_rewrite_id() )
467 )
468 );
469
470 // Remove topic subscriptions from user-meta
471 bbp_register_repair_tool(
472 array(
473 'id' => 'bbp-user-topic-subscriptions-delete',
474 'type' => 'upgrade',
475 'title' => esc_html__( 'Remove topic subscriptions from user-meta', 'bbpress' ),
476 'description' => esc_html__( 'Run this to delete old data (after confirming successful topic subscriptions upgrade)', 'bbpress' ),
477 'callback' => 'bbp_admin_upgrade_remove_topic_subscriptions_from_usermeta',
478 'priority' => 130,
479 'version' => '2.6.1',
480 'overhead' => 'medium',
481 'components' => array( bbp_get_user_rewrite_id(), bbp_get_user_subscriptions_rewrite_id() )
482 )
483 );
484
485 // Remove forum subscriptions from user-meta
486 bbp_register_repair_tool(
487 array(
488 'id' => 'bbp-user-forum-subscriptions-delete',
489 'type' => 'upgrade',
490 'title' => esc_html__( 'Remove forum subscriptions from user-meta', 'bbpress' ),
491 'description' => esc_html__( 'Run this to delete old data (after confirming successful forum subscriptions upgrade)', 'bbpress' ),
492 'callback' => 'bbp_admin_upgrade_remove_forum_subscriptions_from_usermeta',
493 'priority' => 135,
494 'version' => '2.6.1',
495 'overhead' => 'medium',
496 'components' => array( bbp_get_user_rewrite_id(), bbp_get_user_subscriptions_rewrite_id() )
497 )
498 );
499
500 // Sync all BuddyPress group forum relationships
501 bbp_register_repair_tool(
502 array(
503 'id' => 'bbp-group-forums',
504 'type' => 'upgrade',
505 'title' => esc_html__( 'Upgrade BuddyPress Group Forum relationships', 'bbpress' ),
506 'description' => esc_html__( 'Run this if you just upgraded BuddyPress Forums from Legacy.', 'bbpress' ),
507 'callback' => 'bbp_admin_upgrade_group_forum_relationship',
508 'priority' => 140,
509 'version' => esc_html__( 'Any', 'bbpress' ),
510 'overhead' => 'low',
511 'components' => array( bbp_get_forum_post_type() )
512 )
513 );
514 }
515
516 /**
517 * Output the tabs in the admin area
518 *
519 * @since 2.1.0 bbPress (r3872)
520 *
521 * @param string $active_tab Name of the tab that is active
522 */
523 function bbp_tools_admin_tabs( $active_tab = '' ) {
524 echo bbp_get_tools_admin_tabs( $active_tab );
525 }
526
527 /**
528 * Output the tabs in the admin area
529 *
530 * @since 2.1.0 bbPress (r3872)
531 *
532 * @param string $active_tab Name of the tab that is active
533 */
534 function bbp_get_tools_admin_tabs( $active_tab = '' ) {
535
536 // Declare local variables
537 $tabs_html = '';
538 $idle_class = 'nav-tab';
539 $active_class = 'nav-tab nav-tab-active';
540
541 // Setup core admin tabs
542 $tabs = bbp_get_tools_admin_pages();
543
544 // Loop through tabs and build navigation
545 foreach ( $tabs as $tab ) {
546
547 // Skip if user cannot visit page
548 if ( ! current_user_can( $tab['cap'] ) ) {
549 continue;
550 }
551
552 // Setup tab HTML
553 $is_current = (bool) ( $tab['page'] === $active_tab );
554 $tab_class = $is_current ? $active_class : $idle_class;
555 $tab_url = add_query_arg( array( 'page' => $tab['page'] ), admin_url( 'tools.php' ) );
556
557 // Tab name is not escaped - may contain HTML
558 $tabs_html .= '<a href="' . esc_url( $tab_url ) . '" class="' . esc_attr( $tab_class ) . '">' . $tab['name'] . '</a>';
559 }
560
561 // Output the tabs
562 return $tabs_html;
563 }
564
565 /**
566 * Return possible tools pages
567 *
568 * @since 2.6.0 bbPress (r6273)
569 *
570 * @return array
571 */
572 function bbp_get_tools_admin_pages() {
573
574 // Get tools URL one time & use in each tab
575 $tools_url = admin_url( 'tools.php' );
576
577 /**
578 * Filters the tools admin pages.
579 *
580 * @since 2.6.0 bbPress (r6273)
581 *
582 * @param array $pages The default array of tools pages.
583 */
584 return (array) apply_filters(
585 'bbp_tools_admin_tabs',
586 array(
587 array(
588 'page' => 'bbp-repair',
589 'func' => 'bbp_admin_repair_page',
590 'cap' => 'bbp_tools_repair_page',
591 'name' => bbp_maybe_append_pending_upgrade_count( esc_html__( 'Repair Forums', 'bbpress' ), 'repair' ),
592
593 // Deprecated 2.6.0
594 'href' => add_query_arg( array( 'page' => 'bbp-repair' ), $tools_url )
595 ),
596 array(
597 'page' => 'bbp-upgrade',
598 'func' => 'bbp_admin_upgrade_page',
599 'cap' => 'bbp_tools_upgrade_page',
600 'name' => bbp_maybe_append_pending_upgrade_count( esc_html__( 'Upgrade Forums', 'bbpress' ), 'upgrade' ),
601
602 // Deprecated 2.6.0
603 'href' => add_query_arg( array( 'page' => 'bbp-upgrade' ), $tools_url )
604 ),
605 array(
606 'page' => 'bbp-converter',
607 'func' => 'bbp_converter_settings_page',
608 'cap' => 'bbp_tools_import_page',
609 'name' => esc_html__( 'Import Forums', 'bbpress' ),
610
611 // Deprecated 2.6.0
612 'href' => add_query_arg( array( 'page' => 'bbp-converter' ), $tools_url )
613 ),
614 array(
615 'page' => 'bbp-reset',
616 'func' => 'bbp_admin_reset_page',
617 'cap' => 'bbp_tools_reset_page',
618 'name' => esc_html__( 'Reset Forums', 'bbpress' ),
619
620 // Deprecated 2.6.0
621 'href' => add_query_arg( array( 'page' => 'bbp-reset' ), $tools_url )
622 )
623 )
624 );
625 }
626