• Seeing errors when upgrading to PHP 7.2+.

    Deprecated: Function create_function() is deprecated in /wp-content/plugins/wp-posts-carousel/carousel-widget.class.php on line 382

    Looks like you need to adjust the function to be as follows on line 382 of carousel-widget.class.php:

    function yourmodifier_register_widgets() {
    	register_widget( 'WpPostsCarouselWidget' );
    }
    add_action( 'widgets_init', 'yourmodifier_register_widgets' );

    The function you used is anonymous and it really should have a name, as described above, so the plugin can be extended and so it complies with PHP 7+.

    Let us know if you do that, because we’d love to use your plugin instead of our edited version.

  • The topic ‘Deprecated function “create_function” in PHP 7’ is closed to new replies.