<?php /** * Shortcode definition */ $class = "my-element my-element-{$orientation} " . $class; ?> <div <?php echo cs_atts(array('id' => $id, 'class' => $class, 'style' => $style)); ?> > <?php if ($heading) { ?> <h4 class="my-element-heading" style="color:<?php echo $heading_color; ?> "> <?php echo $heading; ?> </h4> <?php } echo $content; ?> </div>
<?php /** * Element Shortcode: Icon List Item */ $atts = cs_atts(array('id' => $id, 'class' => trim('x-li-icon ' . $class), 'style' => $style)); $icon_atts = cs_atts(array('class' => 'x-icon-' . $type, 'data-x-icon' => fa_entity($type), 'aria-hidden' => 'true')); echo "<li {$atts} ><i {$icon_atts} ></i>" . do_shortcode($content) . "</li>";
<?php /** * Element Shortcode: Icon List Item */ $atts = cs_atts(array('id' => $id, 'class' => trim('x-li-icon ' . $class), 'style' => $style)); $icon_style = $icon_color != '' ? "color: {$icon_color};" : ''; $icon_atts = cs_atts(array('class' => 'x-icon-' . $type, 'data-x-icon' => fa_entity($type), 'aria-hidden' => 'true', 'style' => $icon_style)); $link_begin = ''; $link_end = ''; if ($link_enabled) { $link_atts = cs_atts(array('href' => $link_url, 'title' => $link_title, 'target' => $link_new_tab ? '_blank' : '')); $link_begin = "<a {$link_atts}>"; $link_end = "</a>"; } echo "<li {$atts} ><i {$icon_atts} ></i>" . $link_begin . do_shortcode($content) . $link_end . "</li>";
<?php /** * Element Shortcode: Alert */ $close_class = $close ? 'fade in' : 'x-alert-block'; $atts = cs_atts(array('id' => $id, 'class' => trim("x-alert x-alert-{$type} " . $close_class . ' ' . $class), 'style' => $style)); $button = $close ? "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">×</button>" : ''; $heading = $heading ? "<h6 class=\"h-alert\">{$heading}</h6>" : ''; echo "<div {$atts}>{$button}{$heading}" . do_shortcode($content) . "</div>";
<?php /** * Element Shortcode: Text */ $class = ('' == $text_align ? 'x-text' : 'x-text ' . $text_align) . ' ' . esc_attr($class); ?> <div <?php cs_atts(array('id' => $id, 'class' => trim($class), 'style' => $style)); ?> ><?php echo do_shortcode(wpautop($content)); ?> </div>
<?php /** * Element Shortcode: Icon List */ $atts = cs_atts(array('id' => $id, 'class' => trim('x-ul-icons ' . $class), 'style' => $style)); echo "<ul {$atts} >" . do_shortcode($content) . "</ul>";
<?php /** * Shortcode definition */ $classes = array('my-second-element'); $classes[] = $features; ?> <div <?php echo cs_atts(array('id' => $id, 'class' => implode(' ', $classes), 'style' => $style)); ?> > <img src="<?php echo $image; ?> " style="padding: <?php echo $image_padding; ?> ;"> <?php echo $content; ?> </div>