bbp_get_admin_repair_tools( string $type = '' )

Get the array of available repair tools


Description Description


Parameters Parameters

$type

(Optional) repair|upgrade The type of tools to get. Default empty for all tools.

Default value: ''


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/admin/tools/common.php

function bbp_get_admin_repair_tools( $type = '' ) {

	// Get tools array
	$tools = ! empty( bbp_admin()->tools )
		? bbp_admin()->tools
		: array();

	// Maybe limit to type (otherwise return all tools)
	if ( ! empty( $type ) ) {
		$tools = wp_list_filter( bbp_admin()->tools, array( 'type' => $type ) );
	}

	// Filter & return
	return (array) apply_filters( 'bbp_get_admin_repair_tools', $tools, $type );
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.