Changeset 41942
- Timestamp:
- 10/19/2017 01:50:56 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/widgets.php
r41798 r41942 101 101 * 102 102 * @since 2.8.0 103 * @since 4.6.0 Updated the `$widget` parameter to also accept a WP_Widget instance object 104 * instead of simply a `WP_Widget` subclass name. 103 105 * 104 106 * @see WP_Widget … … 106 108 * @global WP_Widget_Factory $wp_widget_factory 107 109 * 108 * @param string $widget_class The name of a class that extends WP_Widget109 */ 110 function register_widget( $widget_class) {110 * @param string|WP_Widget $widget Either the name of a `WP_Widget` subclass or an instance of a `WP_Widget` subclass. 111 */ 112 function register_widget( $widget ) { 111 113 global $wp_widget_factory; 112 114 113 $wp_widget_factory->register( $widget_class);115 $wp_widget_factory->register( $widget ); 114 116 } 115 117 … … 121 123 * 122 124 * @since 2.8.0 125 * @since 4.6.0 Updated the `$widget` parameter to also accept a WP_Widget instance object 126 * instead of simply a `WP_Widget` subclass name. 123 127 * 124 128 * @see WP_Widget … … 126 130 * @global WP_Widget_Factory $wp_widget_factory 127 131 * 128 * @param string $widget_class The name of a class that extends WP_Widget.129 */ 130 function unregister_widget( $widget_class) {132 * @param string|WP_Widget $widget Either the name of a `WP_Widget` subclass or an instance of a `WP_Widget` subclass. 133 */ 134 function unregister_widget( $widget ) { 131 135 global $wp_widget_factory; 132 136 133 $wp_widget_factory->unregister( $widget_class);137 $wp_widget_factory->unregister( $widget ); 134 138 } 135 139 … … 317 321 * 318 322 * @global array $wp_registered_widgets Uses stored registered widgets. 319 * @global array $wp_registered_widget_controls Stores the registered widget control (options).323 * @global array $wp_registered_widget_controls Stores the registered widget controls (options). 320 324 * @global array $wp_registered_widget_updates 321 325 * @global array $_wp_deprecated_widgets_callbacks
Note: See TracChangeset
for help on using the changeset viewer.