The current version of Taboola (v1.0.10) is incompatible with PHP 8. The plugin will appear to activate, but Taboola will not appear within the WP Admin menu.
I tracked the problem down to at least two issues that make the plugin incompatible with PHP 8:
– The plugin uses create_function()
, which was removed from PHP 8: https://www.php.net/manual/en/function.create-function.php
– The plugin uses PHP4 style constructors, which are not allowed in PHP 8
I was able to patch the plugin and get it to show up on the WP Admin by making the following modifications:
The following line can be updated to replace create_function()
with an anonymous function:
https://plugins.trac.www.ads-software.com/browser/taboola/tags/1.0.10/taboola_widget.php#L55
– Replace create_function('', 'return register_widget("WP_Widget_Taboola");')
with function() { return register_widget("WP_Widget_Taboola"); }
.
PHP4 style constructors are not allowed and __construct()
should be used instead:
https://plugins.trac.www.ads-software.com/browser/taboola/tags/1.0.10/taboola_widget.php#L31
– Replace function TaboolaWP()
with function __construct().
Hello,
Taboola widget is not working for post. It is working fine for pages only. Please check it and let me know.
Waiting for reply!
Thanks
]]>We need to have Taboola compatible with PHP 7 when will this be updated and compatible with supported PHP 7?
]]>I initially down loaded a plugin called Taboola. It then auto-generates a widget in the widgets area, all I do is move it to the right where I want it to show on my site and add the publisher ID and the widget ID. I have seen this widget work on many WP sites, I just can’t get it to work on mine.
]]>