load_default_widgets WordPress Filter Hook

The load_default_widgets hook is used to load the default widgets for a Wordpress site. This hook is called when the Wordpress site is first installed and when the Wordpress site is upgraded to a new version.

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.


Top ↑

Parameters

$wp_maybe_load_widgets

(bool)Whether to load the Widgets library. Default true.


Top ↑

Source

File: wp-includes/functions.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More