Support » Plugin: Simple Share Buttons Adder » function create_function() is deprecated in PHP 7.2

  • mmatej

    (@mmatej)


    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/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Simple Share

    (@davidoffneal)

    Hey @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

    (@davidoffneal)

    @mmatej. Can you verify your issue has been resolved with the newest update?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.