bbp_get_admin_repair_tool_registered_components()
Return array of components from the array of registered tools
Description Description
Return Return
(array)
Source Source
File: includes/admin/tools/common.php
function bbp_get_admin_repair_tool_registered_components() {
// Default return value
$retval = array();
// Get tools
$tools = bbp_get_admin_repair_tools( bbp_get_admin_repair_tool_page_id() );
// Loop through tools
if ( ! empty( $tools ) ) {
$plucked = wp_list_pluck( $tools, 'components' );
// Loop through components
if ( count( $plucked ) ) {
foreach ( $plucked as $components ) {
foreach ( $components as $component ) {
// Skip if already in array
if ( in_array( $component, $retval, true ) ) {
continue;
}
// Add component to the array
$retval[] = $component;
}
}
}
}
// Filter & return
return (array) apply_filters( 'bbp_get_admin_repair_tool_registered_components', $retval );
}
Changelog Changelog
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |