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:5427wp_maybe_load_widgets()
Source
View on Trac ↗View on GitHub ↗
5421 *5422 * @since 2.8.05423 *5424 * @param bool $wp_maybe_load_widgets Whether to load the Widgets library.5425 * Default true.5426 */5427 if ( ! apply_filters( 'load_default_widgets', true ) ) {5428 return;5429 }5430 5431 require_once ABSPATH . WPINC . '/default-widgets.php';5432 5433 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 6.8.8 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.