Title: Function create_function() is deprecated
Last modified: November 22, 2021

---

# Function create_function() is deprecated

 *  [rianovost](https://wordpress.org/support/users/suryano11/)
 * (@suryano11)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/function-create_function-is-deprecated-30/)
 * wp-content/plugins/smooth-slider/slider_versions/widgets_1.php:52
    wp-content/
   plugins/smooth-slider/slider_versions/smooth_1.php wp-content/plugins/smooth-
   slider/slider_versions/smooth_1.php:225
 * Rianovost.ru

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [konnpp](https://wordpress.org/support/users/konnpp/)
 * (@konnpp)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/function-create_function-is-deprecated-30/#post-15260172)
 * Hello rianovost,
 * The same thing happened to me, I fixed it by changing the 52 line of widgets_1.
   php (version 2.8.8) with the following:
 * add_action( ‘widgets_init’, function() { return register_widget(“Smooth_Slider_Simple_Widget”);});
 * In file smooth_1.php:225 it includes the widgets_1.php file so I suppose it might
   fix all errors
 *  [nilsen](https://wordpress.org/support/users/nilsen/)
 * (@nilsen)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/function-create_function-is-deprecated-30/#post-15270815)
 * Be aware that copying the above code will not work because the “ and ” and ‘ 
   will cause the code to break, due to WordPress forum auto formating the letters…
 * In smooth-slider/slider_versions/widgets_1.php replace the line 52 with the following
   code like konnpp has pointed out above:
 * `add_action( 'widgets_init', function() { return register_widget("Smooth_Slider_Simple_Widget");});`
 * After that the plugin will continue to work (tested on PHP 8.1).
    create_function()
   is deprecated in newer versions of PHP so it needs to be replaced like so.
    -  This reply was modified 4 years, 2 months ago by [nilsen](https://wordpress.org/support/users/nilsen/).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Function create_function() is deprecated’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/smooth-slider_e7cacb.svg)
 * [Smooth Slider](https://wordpress.org/plugins/smooth-slider/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/smooth-slider/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/smooth-slider/)
 * [Active Topics](https://wordpress.org/support/plugin/smooth-slider/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/smooth-slider/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/smooth-slider/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [nilsen](https://wordpress.org/support/users/nilsen/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/function-create_function-is-deprecated-30/#post-15270815)