wp_user_dashboard_widgets
Filter HookDescription
Filters the list of widgets to load for the User Admin dashboard.Hook Information
File Location |
wp-admin/includes/dashboard.php
View on GitHub
|
Hook Type | Filter |
Line Number | 127 |
Hook Parameters
Type | Name | Description |
---|---|---|
string[]
|
$dashboard_widgets
|
An array of dashboard widget IDs. |
Usage Examples
Basic Usage
<?php
// Hook into wp_user_dashboard_widgets
add_filter('wp_user_dashboard_widgets', 'my_custom_filter', 10, 1);
function my_custom_filter($dashboard_widgets) {
// Your custom filtering logic here
return $dashboard_widgets;
}
Source Code Context
wp-admin/includes/dashboard.php:127
- How this hook is used in WordPress core
<?php
122 *
123 * @since 3.1.0
124 *
125 * @param string[] $dashboard_widgets An array of dashboard widget IDs.
126 */
127 $dashboard_widgets = apply_filters( 'wp_user_dashboard_widgets', array() );
128 } else {
129
130 /**
131 * Fires after core widgets for the admin dashboard have been registered.
132 *
PHP Documentation
<?php
/**
* Filters the list of widgets to load for the User Admin dashboard.
*
* @since 3.1.0
*
* @param string[] $dashboard_widgets An array of dashboard widget IDs.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-admin/includes/dashboard.php
Related Hooks
Related hooks will be displayed here in future updates.