apply_filters( ‘load_default_widgets’, bool $wp_maybe_load_widgets )

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.

Source

if ( ! apply_filters( 'load_default_widgets', true ) ) {

Changelog

VersionDescription
2.8.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.