wp_dashboard_widgets filter-hookWP 2.5.0

Filters the list of widgets to load for the admin dashboard.

Usage

add_filter( 'wp_dashboard_widgets', 'wp_kama_dashboard_widgets_filter' );

/**
 * Function for `wp_dashboard_widgets` filter-hook.
 * 
 * @param string[] $dashboard_widgets An array of dashboard widget IDs.
 *
 * @return string[]
 */
function wp_kama_dashboard_widgets_filter( $dashboard_widgets ){

	// filter...
	return $dashboard_widgets;
}
$dashboard_widgets(string[])
An array of dashboard widget IDs.

Changelog

Since 2.5.0 Introduced.

Where the hook is called

wp_dashboard_setup()
wp_dashboard_widgets
wp-admin/includes/dashboard.php 138
$dashboard_widgets = apply_filters( 'wp_dashboard_widgets', array() );

Where the hook is used in WordPress

Usage not found.