WordPress.org

Make WordPress Core

Ticket #11321: widget.php.diff

File widget.php.diff, 1.0 KB (added by yousan_o, 8 years ago)

a supposing patch of widget.php

  • widgets.php

     
    609609       }
    610610
    611611       $id_base = _get_widget_id_base($id);
    612        if ( in_array($output_callback, $_wp_deprecated_widgets_callbacks, true) && !is_callable($output_callback) ) {
     612       if ( in_array($output_callback, (array)$_wp_deprecated_widgets_callbacks, true) && !is_callable($output_callback) ) {
    613613               if ( isset($wp_registered_widget_controls[$id]) )
    614614                       unset($wp_registered_widget_controls[$id]);
    615615
     
    719719               return;
    720720       }
    721721
    722        if ( in_array($control_callback, $_wp_deprecated_widgets_callbacks, true) && !is_callable($control_callback) ) {
     722       if ( in_array($control_callback, (array)$_wp_deprecated_widgets_callbacks, true) && !is_callable($control_callback) ) {
    723723               if ( isset($wp_registered_widgets[$id]) )
    724724                       unset($wp_registered_widgets[$id]);