bbp_get_admin_repair_tool_registered_versions()
Return array of versions 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_versions() {
// 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, 'version' );
// Loop through components
if ( count( $plucked ) ) {
foreach ( $plucked as $versions ) {
// Skip if empty
if ( empty( $versions ) ) {
continue;
// Cast to array if string
} elseif ( is_string( $versions ) ) {
$versions = (array) $versions;
}
// Loop through versions
foreach ( $versions as $version ) {
// Skip if already in array
if ( in_array( $version, $retval, true ) ) {
continue;
}
// Add component to the array
$retval[] = $version;
}
}
}
}
// Filter & return
return (array) apply_filters( 'bbp_get_admin_repair_tool_registered_versions', $retval );
}
Changelog Changelog
| Version | Description |
|---|---|
| 2.6.0 | Introduced. |