Title: Deprecated function notice
Last modified: July 12, 2019

---

# Deprecated function notice

 *  [Tom Smith](https://wordpress.org/support/users/tom-smith/)
 * (@tom-smith)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/deprecated-function-notice-6/)
 * Message I get on all the pages on the dev and stage servers:
 * Deprecated: Function create_function() is deprecated in /var/www/htdocs/wp-content/
   plugins/healcode-mindbody-widget/widget.php on line 88
 * Code on :88 of named file:
    // add_action(‘widgets_init’, create_function(”, ‘
   return register_widget(“Hc_Insert_Html_Widget”);’)); // <– this is less than 
   perfect
 * // js style anon function call. This is awesome:
    add_action(‘widgets_init’, 
   function() { return register_widget(“Hc_Insert_Html_Widget”); });
 * create_function was supplanted w/ native anon function as of php 5.3.0, in 2008.
   Hey [@mbo](https://wordpress.org/support/users/mbo/) — you might consider … you
   know. 🙂
    -  This topic was modified 6 years, 11 months ago by [Tom Smith](https://wordpress.org/support/users/tom-smith/).
    -  This topic was modified 6 years, 11 months ago by [Tom Smith](https://wordpress.org/support/users/tom-smith/).

Viewing 1 replies (of 1 total)

 *  [daymobrew](https://wordpress.org/support/users/daymobrew/)
 * (@daymobrew)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/deprecated-function-notice-6/#post-12180445)
 * Here’s a patch for the create_function() warning.
    You can also remove the closing?
   >
 * — widget.php.orig 2019-11-22 10:55:10.000000000 +0000
    +++ widget.php 2019-11-
   27 10:31:29.204687000 +0000 @@ -85,5 +85,5 @@
 *  } // end class Hc_Insert_Html_Widget
    -add_action(‘widgets_init’, create_function(”,‘
   return register_widget(“Hc_Insert_Html_Widget”);’)); +add_action(‘widgets_init’,
   function () { return register_widget(“Hc_Insert_Html_Widget”); } ); ?>

Viewing 1 replies (of 1 total)

The topic ‘Deprecated function notice’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/healcode-mindbody-widget_393031.svg)
 * [MINDBODY Widget](https://wordpress.org/plugins/healcode-mindbody-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/healcode-mindbody-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/healcode-mindbody-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/healcode-mindbody-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/healcode-mindbody-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/healcode-mindbody-widget/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [daymobrew](https://wordpress.org/support/users/daymobrew/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/deprecated-function-notice-6/#post-12180445)
 * Status: not resolved