apply_filters( 'load_default_widgets', bool $wp_maybe_load_widgets )
- Since
- 2.8.0
Filters whether to load the Widgets library.
Description
Returning a falsey value from the filter will effectively short-circuit the Widgets library from loading.
Parameters
$wp_maybe_load_widgetsbool- Whether to load the Widgets library. Default true.
Fired at · 1
wp-includes/functions.php:5537wp_maybe_load_widgets()
Source
View on Trac ↗View on GitHub ↗
5531 *5532 * @since 2.8.05533 *5534 * @param bool $wp_maybe_load_widgets Whether to load the Widgets library.5535 * Default true.5536 */5537 if ( ! apply_filters( 'load_default_widgets', true ) ) {5538 return;5539 }5540 5541 require_once ABSPATH . WPINC . '/default-widgets.php';5542 5543 add_action( '_admin_menu', 'wp_widgets_add_menu' );
History
Introduced in 2.8.0. Unchanged from 6.7.7 through 7.1.0.
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.