WP_Widget_Factory::register

SummerySummery

Registers a widget subclass.

Syntax

WP_Widget_Factory::register( string|WP_Widget $widget )

ParametersParameters

$widget

(string|WP_Widget) (Required) Either the name of a WP_Widget subclass or an instance of a WP_Widget subclass.

SourceSource

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


			

ChangelogChangelog

Changelog
Version Description
4.6.0 Updated the $widget parameter to also accept a WP_Widget instance object instead of simply a WP_Widget subclass name.
2.8.0 Introduced.
Scroll to Top