PluginProbe
Taboola / 3.0.2
Taboola v3.0.2
1.0.4 1.0.5 1.0.6 1.0.8 2.0.1 2.0.2 2.1.0 2.1.1 2.2.2 2.2.3 3.0.0 3.0.1 3.0.2 3.1.0 trunk 1.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.2 1.0.3
← All changes | taboola_widget.php +11 -5 3.0.13.0.2 View file →
@@ -2,13 +2,13 @@
2 2 /**
3 3 * Plugin Name: Taboola
4 4 * Plugin URI: https://developers.taboola.com/web-integrations/docs/wordpress-plugin
5 5 * Description: Taboola
6 - * Version: 3.0.1
6 + * Version: 3.0.2
7 7 * Author: Taboola
8 8 */
9 9
10 -define( 'TABOOLA_PLUGIN_VERSION', '3.0.1' ); // track every release
10 +define( 'TABOOLA_PLUGIN_VERSION', '3.0.2' ); // track every release
11 11 define( 'TABOOLA_MIN_VER', '3.0' ); // bump only when DB changes
12 12 define( 'TABOOLA_DEBUG_MODE', false );
13 13
14 14 define( 'TABOOLA_OPTION_NAME', 'taboola_plugin_version' );
@@ -21,9 +21,11 @@
21 21 define( 'TABOOLA_CONTENT_FORMAT_HTML', 'html' );
22 22
23 23 include_once 'widget.php';
24 24 require_once 'JavaScriptWrapper.php';
25 -require_once plugin_dir_path( __FILE__ ) . 'simple_html_dom.php'; // ← NEW
25 +if ( ! class_exists( 'simple_html_dom' ) ) {
26 + require_once plugin_dir_path( __FILE__ ) . 'simple_html_dom.php'; // ← NEW
27 +}
26 28
27 29 if ( ! class_exists( 'TaboolaWP' ) ) {
28 30 class TaboolaWP {
29 31
@@ -554,9 +556,11 @@
554 556
555 557 // server side selector provided (see simple_html_dom selectors http://simplehtmldom.sourceforge.net/manual.htm)
556 558 // basically it's CSS selectors like in jQuery
557 559 } else{
558 - require_once('simple_html_dom.php');
560 + if ( ! class_exists( 'simple_html_dom' ) ) {
561 + require_once('simple_html_dom.php');
562 + }
559 563
560 564 $html_doc = str_get_html($content);
561 565 $target_location = $html_doc->find($location, ($occurrence) - 1);
562 566
@@ -615,10 +619,12 @@
615 619 }
616 620
617 621 // server side selector provided (see simple_html_dom selectors http://simplehtmldom.sourceforge.net/manual.htm)
618 622 // basically it's CSS selectors like in jQuery
619 - } else{
623 + } else{
624 + if ( ! class_exists( 'simple_html_dom' ) ) {
620 625 require_once('simple_html_dom.php');
626 + }
621 627
622 628 $html_doc = str_get_html($content);
623 629 $target_location = $html_doc->find($location,($this->settings->home_location_string_occurrence)-1);
624 630