@@ -17,7 +17,9 @@ |
||
17 | 17 | /** |
18 | 18 | * Prevent loading the library more than once |
19 | 19 | */ |
20 | -if( defined( 'AMARKAL_SHORTCODE' ) ) return false; |
|
20 | +if( defined( 'AMARKAL_SHORTCODE' ) ) { |
|
21 | + return false; |
|
22 | +} |
|
21 | 23 | define( 'AMARKAL_SHORTCODE', true ); |
22 | 24 | |
23 | 25 | if(!function_exists('amarkal_register_shortcode')) |
@@ -184,15 +184,15 @@ |
||
184 | 184 | if('content' !== $name) |
185 | 185 | { |
186 | 186 | $template .= " $name=\"{{{$name}}}\""; |
187 | + } else { |
|
188 | + $self_enclosing = false; |
|
187 | 189 | } |
188 | - else $self_enclosing = false; |
|
189 | 190 | } |
190 | 191 | |
191 | 192 | if($self_enclosing) |
192 | 193 | { |
193 | 194 | $template .= "/]"; |
194 | - } |
|
195 | - else { |
|
195 | + } else { |
|
196 | 196 | $template .= "]{{content}}[/$tag]"; |
197 | 197 | } |
198 | 198 |