Changeset 6274 for trunk/src/includes/admin/tools.php
- Timestamp:
- 02/02/2017 11:08:01 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/includes/admin/tools.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/tools.php
r6257 r6274 10 10 // Exit if accessed directly 11 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 _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>', get_admin_url( '', add_query_arg( array( 'page' => $tool['page'] ), 'tools.php' ) ), $tool['name'] ); 45 } 46 47 // Output links 48 echo '<p class="bbp-tools-links">' . implode( ' · ', $links ) . '</p>'; 49 50 ?></div> 51 52 <?php 53 } 12 54 13 55 /** Repair ********************************************************************/
Note: See TracChangeset
for help on using the changeset viewer.