bbp_register_repair_tool( array $args = array() )
Register an admin area repair tool
Description Description
Parameters Parameters
- $args
-
(Optional)
Default value: array()
Return Return
()
Source Source
File: includes/admin/tools.php
function bbp_register_repair_tool( $args = array() ) { // Parse arguments $r = bbp_parse_args( $args, array( 'id' => '', 'type' => '', 'title' => '', 'description' => '', 'callback' => '', 'priority' => 0, 'overhead' => 'low', 'version' => '', 'components' => array(), // @todo 'success' => esc_html__( 'The repair was completed successfully', 'bbpress' ), 'failure' => esc_html__( 'The repair was not successful', 'bbpress' ) ), 'register_repair_tool' ); // Bail if missing required values if ( empty( $r['id'] ) || empty( $r['priority'] ) || empty( $r['title'] ) || empty( $r['callback'] ) ) { return; } // Add tool to the registered tools array bbp_admin()->tools[ $r['id'] ] = array( 'type' => $r['type'], 'title' => $r['title'], 'description' => $r['description'], 'priority' => $r['priority'], 'callback' => $r['callback'], 'overhead' => $r['overhead'], 'components' => $r['components'], 'version' => $r['version'], // @todo 'success' => $r['success'], 'failure' => $r['failure'], ); }
Changelog Changelog
Version | Description |
---|---|
2.6.0 | Introduced. |