Support » Plugin: Photo Gallery by 10Web - Mobile-Friendly Image Gallery » Deprecated function used to register widget

  • Resolved netpassprodsr

    (@netpassprodsr)


    Running WordPress v5.1.1 running on PHP 7.2.16. Plugin version 2.2.69
    I activated the debug log for my site and noticed these PHP Deprecated warnings:

    Function create_function() is deprecated in /path/to/plugins/photo-gallery/photo-gallery.php on line 725
    Function create_function() is deprecated in /path/to/plugins/photo-gallery/photo-gallery.php on line 727
    Function create_function() is deprecated in /path/to/plugins/photo-gallery/photo-gallery.php on line 729

    I suggest this alternative to invoking the register_widget during widgets_init which is compatible with latest PHP engine version:

      require_once(WD_BWG_DIR . '/admin/controllers/BWGControllerWidget.php');
      add_action('widgets_init', function() { return register_widget("BWGControllerWidget"); } );
      require_once(WD_BWG_DIR . '/admin/controllers/BWGControllerWidgetSlideshow.php');
      add_action('widgets_init', function() { return register_widget("BWGControllerWidgetSlideshow"); } );
      require_once(WD_BWG_DIR . '/admin/controllers/BWGControllerWidgetTags.php');
      add_action('widgets_init', function() { return register_widget("BWGControllerWidgetTags"); } );
Viewing 1 replies (of 1 total)
  • Plugin Support kimabaghdasaryan

    (@kimabaghdasaryan)

    Hi,

    Please, note that in the WordPress.org forum we are replying to the free product related question only. For the questions regarding the Premium version, please contact our support team using the following form.

    Thank you in advance!

    Have a nice day!

Viewing 1 replies (of 1 total)
  • The topic ‘Deprecated function used to register widget’ is closed to new replies.