Skip to:
Content

bbPress.org


Ignore:
Timestamp:
02/02/2017 11:08:01 PM (9 years ago)
Author:
johnjamesjacoby
Message:

Tools: Unify the tab/link experience:

  • Introduce function to get tools pages
  • Trust capability checks in core WordPress functions, and remove our own bespoke pre-checks
  • Add tool-box to wp-admin/tools.php linking to tools the user has access to

This change promotes exposure to bbPress's tools pages, and makes adding third-party tools pages easier.

See: #2959.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/actions.php

    r6186 r6274  
    4747add_action( 'current_screen',          'bbp_current_screen'                );
    4848add_action( 'wpmu_new_blog',           'bbp_new_site',               10, 6 );
     49add_action( 'tool_box',                'bbp_admin_tool_box'                );
    4950
    5051// Hook on to admin_init
     
    8990add_action( 'load-tools_page_bbp-repair', 'bbp_admin_repair_handler' );
    9091add_action( 'load-tools_page_bbp-reset',  'bbp_admin_reset_handler'  );
     92add_action( 'bbp_admin_tool_box',         'bbp_admin_tools_box'      );
    9193
    9294// Add sample permalink filter
     
    266268
    267269/**
     270 * Dedicated action to output admin tools.php sections
     271 *
     272 * @since 2.6.0 bbPress (r6273)
     273 *
     274 * @uses do_action() Calls 'bbp_admin_tool_box'
     275 */
     276function bbp_admin_tool_box() {
     277    do_action( 'bbp_admin_tool_box' );
     278}
     279
     280/**
    268281 * Dedicated action to hook into the current screen
    269282 *
Note: See TracChangeset for help on using the changeset viewer.