Usage
[div class style]content[/div]
Parameters
class
(Optional) (String) Classes to add
Default: None
style
(Optional) (String) Inline styles to add
Default: None
close
(Optional) (String) Alternate method to close the div tag
Default: None
content
(Optional) (Mixed) The content to appear inside the div
Default: None
Examples
[div class="special" style="background: red;"]This is the content of my div.[/div]
[div]This is the content here.[div close]
Source File
Located in /libs/Shortcodes.php on line 163.
public function div_shortcode($atts, $content=''){ extract(shortcode_atts(array("class" => '', "style" => '', "open" => '', "close" => ''), $atts)); if ( $content ){ $div = '<div class="nebula-div ' . esc_attr($class) . '" style="' . esc_attr($style) . '">' . do_shortcode($content) . '</div>'; } else { if ( $close ){ $div = '</div>'; } else { $div = '<div class="nebula-div nebula-div-open' . esc_attr($class) . '" style="' . esc_attr($style) . '">'; } } return $div; }
Override
To override or disable this shortcode, use add_shortcode()
to declare the shortcode first.