PluginProbe
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets / 4.5.6
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets v4.5.6
4.5.6 4.5.5 4.5.4 4.2.1 4.2.2 4.2.3 4.5.0 4.5.2 4.5.3 4.2.0 4.1.18 4.1.17 4.1.16 4.1.15 4.1.14 4.1.13 4.1.12 4.1.11 4.1.10 4.1.9 4.1.8 4.0.9 4.1.0 4.1.1 4.1.2 All 148 releases
← All changes | includes/class-duplicator.php +11 -2 4.5.2 → 4.5.6 View file →
@@ -12,9 +12,9 @@
12 12 /**
13 13 * Duplicator Class
14 14 */
15 15
16 -if (!class_exists('BdThemes_Duplicator')) :
16 +if (!class_exists(__NAMESPACE__ . '\\BdThemes_Duplicator')) :
17 17 class BdThemes_Duplicator {
18 18
19 19 public function __construct() {
20 20 add_action('admin_action_ultimate_post_kit_duplicate_as_draft', [$this, 'bdt_duplicate_as_draft']);
@@ -215,6 +215,15 @@
215 215 }
216 216 }
217 217 endif;
218 218
219 -
219 +/**
220 + * Instantiate the namespaced class.
221 + *
222 + * The guard above and this statement must resolve to the same class. An
223 + * unqualified class_exists() string is always resolved against the global
224 + * namespace, so a sibling plugin declaring a global \BdThemes_Duplicator
225 + * (Live Copy Paste does) used to satisfy the old guard and skip the
226 + * declaration, while this line still asked for
227 + * UltimatePostKit\Includes\BdThemes_Duplicator -- a fatal error.
228 + */
220 229 new BdThemes_Duplicator();