PluginProbe
NotificationX – FOMO, Live Sales Notification, WooCommerce Sales Popup, GDPR, Social Proof, Announcement Banner & Floating Notification Bar / 3.3.3
NotificationX – FOMO, Live Sales Notification, WooCommerce Sales Popup, GDPR, Social Proof, Announcement Banner & Floating Notification Bar v3.3.3
3.3.3 3.3.2 3.3.1 3.3.0 3.2.14 3.2.13 3.2.12 3.2.11 3.2.10 3.2.9 3.2.8 3.2.7 trunk 0.2.5.5 0.2.5.6 0.2.5.7 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 All 158 releases
← All changes | includes/Features/ShortcodeInline.php +10 -0 3.2.13 → 3.3.3 View file →
@@ -81,8 +81,13 @@
81 81 /**
82 82 * @var WooInline|EDDInline
83 83 */
84 84 $extension = \NotificationX\Extensions\ExtensionFactory::get_instance()->get($settings['source']);
85 + // The inline renderers live in NotificationX Pro; without it (or with the
86 + // module disabled) the extension is a stub or missing.
87 + if ( ! $extension || ! method_exists( $extension, 'show_inline_notification' ) ) {
88 + return '';
89 + }
85 90 $output = $extension->show_inline_notification( $atts, $settings);
86 91 if( !empty( $output ) ) {
87 92 $output = "<div id='notificationx-shortcode-inline-{$atts['id']}' class='notificationx-shortcode-inline-wrapper nx-shortcode-notice'>$output</div>";
88 93 }
@@ -106,8 +111,13 @@
106 111 array_multisort( $col, SORT_ASC, $entries );
107 112 }
108 113 $entry = end( $entries );
109 114 $template = Inline::get_instance()->get_template( $settings );
115 + // Freemius themes return their lines as an array (for the popup
116 + // layout); the shortcode renders one string, so join them.
117 + if ( is_array( $template ) ) {
118 + $template = implode( ' ', array_filter( array_map( 'trim', array_filter( $template, 'is_scalar' ) ), 'strlen' ) );
119 + }
110 120 $_template = $template;
111 121
112 122 foreach ( $entry as $key => $val ) {
113 123 if ( ! is_array( $val ) ) {