| @@ -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 | +} | |