PluginProbe
Boxzilla – WordPress Popup Builder / 3.2.4
Boxzilla – WordPress Popup Builder v3.2.4
3.4.11 3.4.10 3.4.9 3.4.3 3.4.4 3.4.5 3.4.6 3.4.7 3.4.8 trunk 3.0 3.0.1 3.0.2 3.0.3 3.1 3.1.1 3.1.10 3.1.11 3.1.12 3.1.13 3.1.14 3.1.15 3.1.16 3.1.17 3.1.18 All 72 releases
← All changes | src/class-box.php +10 -4 3.1.163.2.4 View file →
@@ -179,12 +179,18 @@
179 179 $box = $this;
180 180
181 181 // replace boxzilla specific shortcodes
182 182 $close_link = sprintf('<a href="javascript:Boxzilla.dismiss(%d);">', $this->ID );
183 - $content = str_replace( '[boxzilla-close]', $close_link, $content );
184 - $content = str_replace( '[/boxzilla-close]', '</a>', $content );
185 183
184 + $replacements = array(
185 + '[boxzilla_close]' => $close_link, // accept underscore and dash here for consistency with other shortcode
186 + '[boxzilla-close]' => $close_link,
187 + '[/boxzilla_close]' => '</a>',
188 + '[/boxzilla-close]' => '</a>',
189 + );
186 190
191 + $content = str_replace( array_keys( $replacements ), array_values( $replacements ), $content );
192 +
187 193 /**
188 194 * Filters the HTML for the box content
189 195 *
190 196 * @param string $content
@@ -224,9 +230,9 @@
224 230
225 231 $client_options = array(
226 232 'id' => $box->ID,
227 233 'icon' => $box->get_close_icon(),
228 - 'content' => $box->get_content(),
234 + 'content' => '', // we grab this later from an HTML element
229 235 'css' => array_filter( $box->options['css'] ),
230 236 'trigger' => $trigger,
231 237 'animation' => $box->options['animation'],
232 238 'cookie' => array(
@@ -254,5 +260,5 @@
254 260
255 261 return $client_options;
256 262 }
257 263
258 -}
264 +}