Hi,
I’ve made this modification in my installation to avoid DEPRECATED messages when using PHP 7.2, because create_function doesn’t exist anymore.
diff --git a/wp-content/plugins/adrotate-pro/adrotate-pro.php b/wp-content/plugins/adrotate-pro/adrotate-pro.php
index ea873a5a..1b9f834a 100644
--- a/wp-content/plugins/adrotate-pro/adrotate-pro.php
+++ b/wp-content/plugins/adrotate-pro/adrotate-pro.php
-add_action('widgets_init', create_function('', 'return register_widget("adrotate_widgets");')); // Depreciated widget
-add_action('widgets_init', create_function('', 'return register_widget("ajdg_grpwidgets");')); // Group widget
-add_action('widgets_init', create_function('', 'return register_widget("ajdg_bnnrwidgets");')); // Advert widget
-if(adrotate_is_networked()) add_action('widgets_init', create_function('', 'return register_widget("ajdg_nwidgets");')); // Network widget
+
+add_action('widgets_init', function() {
+ return register_widget("adrotate_widgets");
+});
+
+add_action('widgets_init', function() {
+ return register_widget("ajdg_grpwidgets");
+});
+
+add_action('widgets_init', function() {
+ return register_widget("ajdg_bnnrwidgets");
+});
+
+if (adrotate_is_networked()) {
+ add_action('widgets_init', function() {
+ return register_widget("ajdg_nwidgets");
+ });
+}
+
Would it be possible you add these lines to the plugin?
Kind regards,
The function exists just fine, it’s merely depreciated so that it can be removed in a future version of PHP. Which can take years.
The next version already removed the use of the
create_function
.