Title: function create_function() is deprecated in PHP 7.2
Last modified: March 26, 2018

---

# function create_function() is deprecated in PHP 7.2

 *  Resolved [mmatej](https://wordpress.org/support/users/mmatej/)
 * (@mmatej)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/function-create_function-is-deprecated-in-php-7-2/)
 * Please fix the create_function() in wp-content/plugins/simple-share-buttons-adder/
   php/class-widget.php which is deprecated, it renders a warning. I can fix it,
   but it gets back after updates.
 * fix:
    — add_action( ‘widgets_init’, create_function( ”, ‘register_widget( “SimpleShareButtonsAdder\
   Widget” );’ ) ); +++ add_action( ‘widgets_init’, function() { register_widget(“
   SimpleShareButtonsAdder\Widget” ); } );
 * credit:
    [https://wordpress.org/support/topic/v2-0-3-function-create_function-is-deprecated-in-php-7-2/](https://wordpress.org/support/topic/v2-0-3-function-create_function-is-deprecated-in-php-7-2/)

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

 *  Plugin Author [Simple Share](https://wordpress.org/support/users/davidoffneal/)
 * (@davidoffneal)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/function-create_function-is-deprecated-in-php-7-2/#post-10128562)
 * Hey [@mmatej](https://wordpress.org/support/users/mmatej/) thanks for catching
   this. We’ve made the necessary code update to “register_widget()” instead of 
   the old way. You should see this fix in the newest version 7.4.16 coming out 
   soon. Thanks again and keep you posted.
 *  Plugin Author [Simple Share](https://wordpress.org/support/users/davidoffneal/)
 * (@davidoffneal)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/function-create_function-is-deprecated-in-php-7-2/#post-10166317)
 * [@mmatej](https://wordpress.org/support/users/mmatej/). Can you verify your issue
   has been resolved with the newest update?
 *  Plugin Author [Simple Share](https://wordpress.org/support/users/davidoffneal/)
 * (@davidoffneal)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/function-create_function-is-deprecated-in-php-7-2/#post-10234635)
 * feel free to reach out for any other issues.
 *  Thread Starter [mmatej](https://wordpress.org/support/users/mmatej/)
 * (@mmatej)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/function-create_function-is-deprecated-in-php-7-2/#post-10239929)
 * I updated to 7.8.18 and the afore mentioned issue is not present, great, however
   a new issue arises with Undefined index: ignore_facebook_sdk 🙁 I search for 
   the ticket or open a new one

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

The topic ‘function create_function() is deprecated in PHP 7.2’ is closed to new
replies.

 * ![](https://ps.w.org/simple-share-buttons-adder/assets/icon-256x256.png?rev=2661516)
 * [Simple Share Buttons Adder](https://wordpress.org/plugins/simple-share-buttons-adder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-share-buttons-adder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-share-buttons-adder/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-share-buttons-adder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-share-buttons-adder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-share-buttons-adder/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [mmatej](https://wordpress.org/support/users/mmatej/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/function-create_function-is-deprecated-in-php-7-2/#post-10239929)
 * Status: resolved