Advertisements

wp_maybe_load_widgets

Definition:
function wp_maybe_load_widgets() {}

Determines if Widgets library should be loaded.
Checks to make sure that the widgets library hasn’t already been loaded. If it hasn’t, then it will load the widgets library and run an action hook.

Defined filters

  • load_default_widgets
    apply_filters('load_default_widgets', true)

Source code

function wp_maybe_load_widgets() {

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

		return;

	require_once( ABSPATH . WPINC . '/default-widgets.php' );

	add_action( '_admin_menu', 'wp_widgets_add_menu' );

}

3909

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: