Your cart is empty!
Unload Widgets
apply_filters( 'vikbooking_unload_admin_widgets', array $return )
Fired before loading the Admin-Widgets for your Dashboard or Multitask Panel.
Description
This hook is useful to stop the loading of specific admin widgets in case you don't want them to be listed or available in your website back-end section at all.
Parameters
- $return
-
Callback function for the filter 'vikbooking_unload_admin_widgets' where you can return a list of admin-widget identifiers to unload.
Example
The example below shows how to unregister the admin-widget "Orphan Dates".
// register callback for filter "vikbooking_unload_admin_widgets"
add_filter('vikbooking_unload_admin_widgets', function($return)
{
if (!$return)
{
$return = [];
}
/**
* In this example, we are telling VikBooking to unload one admin widget.
*/
return array_merge($return, [
// provide the widget identifier to unload
'orphan_dates',
]);
});
Last Update: 2023-03-28
Helpful?
100% of people found this helpful.