• Hello,

    Your main plugin file (simple-taxonomy.php) line 83:
    add_action( ‘widgets_init’, create_function(”, ‘return register_widget(“SimpleTaxonomy_Widget”);’) );

    uses create_function which by php7.2 is deprecated and logs many warnings.

    would you be kind enough to change that?
    I’m actually am uncertain why you had to use that, and not just create a static function as register_widget is a global function which is usually available so you shouldn’t need a create_function to call it.

    If by some chance I missed the reason, you might try an anonymous function instead…

    thank you in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter daberelay

    (@daberelay)

    here’s a correction that seems to work just fine:

    // Widget
    add_action( ‘widgets_init’, ‘register_widget_simple_taxonomy’ );
    }

    function register_widget_simple_taxonomy() {
    return register_widget(“SimpleTaxonomy_Widget”);
    }

    would you please provide the fix?

    many thanks

    @daberelay Thanks for this fix ??
    This isn’t the only plugin that’s hit this problem …

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘create_function is deprecated in php 7.2’ is closed to new replies.