[ Index ]

PHP Cross Reference of BBPress

title

Body

[close]

/src/includes/admin/ -> tools.php (source)

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


Generated: Sun Sep 15 01:01:26 2019 Cross-referenced by PHPXref 0.7.1