Make WordPress Core

Ticket #28216: 28216.update-api-function-docs.patch

File 28216.update-api-function-docs.patch, 1.3 KB (added by mdwheele, 9 years ago)

Updates register_widget and unregister_widget docs to reflect change in argument type expectation.

  • src/wp-includes/widgets.php

     
    687687        'wp_widget_recent_comments_control'
    688688);
    689689
    690 /* Template tags & API functions */
    691 
    692690/**
    693691 * Register a widget
    694692 *
     
    700698 *
    701699 * @global WP_Widget_Factory $wp_widget_factory
    702700 *
    703  * @param string $widget_class The name of a class that extends WP_Widget
     701 * @param string $widgetish The name of a class that extends WP_Widget or an instance of WP_Widget
    704702 */
    705 function register_widget($widget_class) {
     703function register_widget($widgetish) {
    706704        global $wp_widget_factory;
    707705
    708         $wp_widget_factory->register($widget_class);
     706        $wp_widget_factory->register($widgetish);
    709707}
    710708
    711709/**
     
    720718 *
    721719 * @global WP_Widget_Factory $wp_widget_factory
    722720 *
    723  * @param string $widget_class The name of a class that extends WP_Widget
     721 * @param string $widgetish The name of a class that extends WP_Widget or an instance of WP_Widget
    724722 */
    725 function unregister_widget($widget_class) {
     723function unregister_widget($widgetish) {
    726724        global $wp_widget_factory;
    727725
    728         $wp_widget_factory->unregister($widget_class);
     726        $wp_widget_factory->unregister($widgetish);
    729727}
    730728
    731729/**