WP_Widget_Factory::__construct() WordPress Method

The WP_Widget_Factory::__construct() method is used to create a new widget factory. A widget factory is used to create widgets for a WordPress site. This method takes two arguments: the widget_id and the widget_name. The widget_id is used to identify the widget in the WordPress database. The widget_name is used to identify the widget in the WordPress code.

WP_Widget_Factory::__construct() #

PHP5 constructor.


Source

File: wp-includes/class-wp-widget-factory.php

	public function __construct() {
		add_action( 'widgets_init', array( $this, '_register_widgets' ), 100 );
	}


Top ↑

Changelog

Changelog
VersionDescription
4.3.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.