Changeset 30774
- Timestamp:
- 12/07/2014 08:07:05 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/widgets.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/widgets.php
r30773 r30774 549 549 } 550 550 551 public function register($widget_class) { 551 /** 552 * Register a widget subclass. 553 * 554 * @since 2.8.0 555 * @access public 556 * 557 * @param string $widget_class The name of a {@see WP_Widget} subclass. 558 */ 559 public function register( $widget_class ) { 552 560 $this->widgets[$widget_class] = new $widget_class(); 553 561 } 554 562 555 public function unregister($widget_class) { 563 /** 564 * Un-register a widget subclass. 565 * 566 * @since 2.8.0 567 * @access public 568 * 569 * @param string $widget_class The name of a {@see WP_Widget} subclass. 570 */ 571 public function unregister( $widget_class ) { 556 572 if ( isset($this->widgets[$widget_class]) ) 557 573 unset($this->widgets[$widget_class]); 558 574 } 559 575 576 /** 577 * Utility method for adding widgets to the registered widgets global. 578 * 579 * @since 2.8.0 580 * @access public 581 */ 560 582 public function _register_widgets() { 561 583 global $wp_registered_widgets;
Note: See TracChangeset
for help on using the changeset viewer.