PluginProbe
Extendify / 3.2.1
Extendify v3.2.1
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
← All changes | app/Notifications/Frontend.php +16 -4 3.1.53.2.1 View file →
@@ -19,8 +19,9 @@
19 19 public function __construct()
20 20 {
21 21 \add_action('wp_enqueue_scripts', [$this, 'loadScriptsAndStyles']);
22 22 \add_action('wp_footer', [$this, 'renderMountPoint']);
23 + \add_action('wp_footer', [$this, 'renderModalMountPoint']);
23 24 \add_action('admin_bar_menu', [$this, 'registerAdminBarNode'], 100);
24 25 \add_action('extendify_toolbar_right', [$this, 'renderToolbarMountPoint']);
25 26 }
26 27
@@ -36,13 +37,15 @@
36 37 * @return void
37 38 */
38 39 public function loadScriptsAndStyles()
39 40 {
40 - if (!self::shouldRender(Slots::FRONTEND_BOTTOM) && !self::shouldRender(Slots::FRONTEND_TOPBAR)) {
41 - return;
41 + $slots = [Slots::FRONTEND_BOTTOM, Slots::FRONTEND_TOPBAR, Slots::FRONTEND_MODAL];
42 + foreach ($slots as $slot) {
43 + if (self::shouldRender($slot)) {
44 + Assets::enqueue();
45 + return;
46 + }
42 47 }
43 -
44 - Assets::enqueue();
45 48 }
46 49
47 50 /**
48 51 * @return void
@@ -50,8 +53,17 @@
50 53 public function renderMountPoint()
51 54 {
52 55 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Mount escapes
53 56 echo self::container(Slots::FRONTEND_BOTTOM);
57 + }
58 +
59 + /**
60 + * @return void
61 + */
62 + public function renderModalMountPoint()
63 + {
64 + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Mount escapes
65 + echo self::container(Slots::FRONTEND_MODAL);
54 66 }
55 67
56 68 /**
57 69 * @return void