[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/ -> class-wp-widget-factory.php (summary)

Widget API: WP_Widget_Factory class

File Size: 140 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_Widget_Factory:: (7 methods):
  __construct()
  WP_Widget_Factory()
  register()
  unregister()
  _register_widgets()
  get_widget_object()
  get_widget_key()


Class: WP_Widget_Factory  - X-Ref

Singleton that registers and instantiates WP_Widget classes.

__construct()   X-Ref
PHP5 constructor.

since: 4.3.0

WP_Widget_Factory()   X-Ref
PHP4 constructor.

since: 2.8.0

register( $widget )   X-Ref
Registers a widget subclass.

since: 2.8.0
since: 4.6.0 Updated the `$widget` parameter to also accept a WP_Widget instance object
param: string|WP_Widget $widget Either the name of a `WP_Widget` subclass or an instance of a `WP_Widget` subclass.

unregister( $widget )   X-Ref
Un-registers a widget subclass.

since: 2.8.0
since: 4.6.0 Updated the `$widget` parameter to also accept a WP_Widget instance object
param: string|WP_Widget $widget Either the name of a `WP_Widget` subclass or an instance of a `WP_Widget` subclass.

_register_widgets()   X-Ref
Serves as a utility method for adding widgets to the registered widgets global.

since: 2.8.0

get_widget_object( $id_base )   X-Ref
Returns the registered WP_Widget object for the given widget type.

since: 5.8.0
return: WP_Widget|null
param: string $id_base Widget type ID.

get_widget_key( $id_base )   X-Ref
Returns the registered key for the given widget type.

since: 5.8.0
return: string
param: string $id_base Widget type ID.



Generated: Fri Apr 26 01:00:03 2024 Cross-referenced by PHPXref 0.7.1