function block($instance) { extract($instance); $id = !empty($id) ? ' id="' . esc_attr($id) . '"' : ''; $userclass = !empty($class) ? ' ' . esc_attr($class) : ''; $style = !empty($style) ? esc_attr($style) : ''; switch ($imagetype) { case 'none': $imageclass = ''; break; case 'rounded': $imageclass = ' class="img-rounded"'; break; case 'circle': $imageclass = ' class="img-circle"'; break; case 'polaroid': $imageclass = ' class="img-polaroid"'; break; } $imageid = get_image_id(esc_url($media)); $image = wp_get_attachment_image_src($imageid, $imagesize); $btnclass = 'btn'; switch ($btncolor) { case 'grey': $btnclass .= ''; break; case 'blue': $btnclass .= ' btn-primary'; break; case 'lightblue': $btnclass .= ' btn-info'; break; case 'green': $btnclass .= ' btn-success'; break; case 'yellow': $btnclass .= ' btn-warning'; break; case 'red': $btnclass .= ' btn-danger'; break; case 'black': $btnclass .= ' btn-inverse'; break; } switch ($btnsize) { case 'default': $btnclass .= ''; break; case 'large': $btnclass .= ' btn-large'; break; case 'small': $btnclass .= ' btn-small'; break; case 'mini': $btnclass .= ' btn-mini'; break; case 'block': $btnclass .= ' btn-block'; break; } switch ($align) { case 'left': $alignclass = ' align-left'; break; case 'center': $alignclass = ' align-center'; break; case 'right': $alignclass = ' align-right'; break; } $output = ''; $output .= '<div' . $id . ' class="features well well-shadow' . $alignclass . $userclass . '" style="background: ' . $bgcolor . ';color: ' . $textcolor . ';' . $style . '">'; $output .= '<img src="' . $image[0] . '"' . $imageclass . ' />'; $output .= '<div class="clear padding5"></div>'; $output .= '<' . $heading . '>' . strip_tags($title) . '</' . $heading . '>'; $output .= '<div class="opacity8">' . wpautop(do_shortcode(mpt_content_kses(htmlspecialchars_decode($text)))) . '</div>'; if ($enablebtn == '1') { $output .= '<a href="' . esc_url($btnlink) . '"' . ($btnlinkopen == 'new' ? ' target="_blank"' : '') . '>'; $output .= '<button class="' . $btnclass . '">' . esc_attr($btntext) . '</button>'; $output .= '</a>'; } $output .= '</div>'; echo $output; }
function block($instance) { extract($instance); $id = !empty($id) ? ' id="' . esc_attr($id) . '"' : ''; $userclass = !empty($class) ? ' ' . esc_attr($class) : ''; $style = !empty($style) ? ' ' . esc_attr($style) : ''; ?> <div id="staff-block"> <div<?php echo $id; ?> class="well well-small<?php echo $userclass; ?> " style="background: <?php echo $bgcolor; ?> ; color: <?php echo $textcolor; ?> ;<?php echo $style; ?> "> <?php if (!empty($media)) { $attachid = get_image_id(esc_url($media)); ?> <center> <?php echo wp_get_attachment_image($attachid, 'tb-360'); ?> </center> <?php } ?> <div class="inner"> <h3 style="color: <?php echo $textcolor; ?> ;"><?php echo strip_tags($title); ?> <small style="color: <?php echo $textcolor; ?> ;"><?php echo strip_tags($position); ?> </small></h3> <?php echo wpautop(do_shortcode(mpt_content_kses(htmlspecialchars_decode($text)))); ?> <center><div class="btn-group"> <?php if (!empty($fb)) { ?> <a href="<?php echo esc_url($fb); ?> " class="btn"><img src="<?php echo get_template_directory_uri(); ?> /img/icon/14/facebook.png" height="14" width="14"></a> <?php } ?> <?php if (!empty($twitter)) { ?> <a href="<?php echo esc_url($twitter); ?> " class="btn"><img src="<?php echo get_template_directory_uri(); ?> /img/icon/14/twitter.png" height="14" width="14"></a> <?php } ?> <?php if (!empty($email) && is_email($email) != 'false') { ?> <a href="mailto:<?php echo is_email($email); ?> " class="btn"><i class="icon-envelope"></i></a> <?php } ?> </div></center> </div> </div> </div> <?php }
function tboot_one_fourth($atts, $content = null) { extract(shortcode_atts(array("id" => '', "class" => ''), $atts)); $id = !empty($id) ? ' id="' . esc_attr($id) . '"' : ''; $class = !empty($class) ? 'span3 ' . esc_attr($class) : 'span3'; $content = mpt_content_kses($content); $output = ''; $output .= '<div' . $id . ' class="' . $class . '">'; $output .= do_shortcode($content); $output .= '</div>'; return $output; }
function block($instance) { extract($instance); echo '<div class="aq_alert ' . $type . ' cf" style="' . $style . '">' . do_shortcode(mpt_content_kses(htmlspecialchars_decode($content))) . '</div>'; }
function block($instance) { extract($instance); $id = !empty($id) ? ' id="' . esc_attr($id) . '"' : ''; $class = !empty($class) ? ' ' . esc_attr($class) : ''; $style = !empty($style) ? ' ' . esc_attr($style) : ''; switch ($align) { case 'left': $alignclass = ' align-left'; break; case 'center': $alignclass = ' align-center'; break; case 'right': $alignclass = ' align-right'; break; } $btnclass = 'cta-btn btn'; switch ($btncolor) { case 'grey': $btnclass .= ''; break; case 'blue': $btnclass .= ' btn-primary'; break; case 'lightblue': $btnclass .= ' btn-info'; break; case 'green': $btnclass .= ' btn-success'; break; case 'yellow': $btnclass .= ' btn-warning'; break; case 'red': $btnclass .= ' btn-danger'; break; case 'black': $btnclass .= ' btn-inverse'; break; } switch ($btnsize) { case 'default': $btnclass .= ''; break; case 'large': $btnclass .= ' btn-large'; break; case 'small': $btnclass .= ' btn-small'; break; case 'mini': $btnclass .= ' btn-mini'; break; } $output = ''; $output .= '<div' . $id . ' class="cta well well-shadow' . $class . '" style="background: ' . $bgcolor . '; border-left: 3px solid ' . $bordercolor . '; ' . $style . '">'; $output .= '<div class="row-fluid">'; $output .= '<div class="span10' . $alignclass . '">'; $output .= '<' . $heading . ' style="color: ' . $textcolor . ';">'; $output .= do_shortcode(mpt_content_kses(htmlspecialchars_decode($headline))); $output .= '<br /><small style="color: ' . $textcolor . ';">'; $output .= do_shortcode(mpt_content_kses(htmlspecialchars_decode($subheadline))); $output .= '</small>'; $output .= '</' . $heading . '>'; $output .= '</div>'; $output .= '<div class="span2 align-center">'; $output .= '<a href="' . esc_url($btnlink) . '" ' . ($btnlinkopen == 'new' ? 'target="_blank"' : '') . '>'; $output .= '<button class="' . $btnclass . '">' . ($btnicon == 'none' ? '' : '<i class="' . $btnicon . ($btncolor == 'grey' ? '' : ' icon-white') . '"></i> ') . esc_attr($btntext) . '</button>'; $output .= '</a>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; echo $output; }
function block($instance) { extract($instance); $id = !empty($id) ? ' id="' . esc_attr($id) . '"' : ''; $class = !empty($class) ? ' ' . esc_attr($class) : ''; $style = !empty($style) ? ' ' . esc_attr($style) : ''; switch ($align) { case 'left': $alignclass = ' align-left'; break; case 'center': $alignclass = ' align-center'; break; case 'right': $alignclass = ' align-right'; break; } $output = ''; $output .= '<div' . $id . ' class="hero-unit' . $alignclass . $class . '" style="background: ' . $bgcolor . '; color: ' . $textcolor . ';' . $style . '"">'; $output .= '<' . $heading . '>'; $output .= do_shortcode(mpt_content_kses(htmlspecialchars_decode($slogan))); $output .= '</' . $heading . '>'; $output .= '</div>'; echo $output; }
function block($instance) { extract($instance); $output = ''; $id = !empty($id) ? ' id="' . esc_attr($id) . '"' : ''; $class = !empty($class) ? 'table ' . esc_attr($class) : 'table'; $style = !empty($style) ? ' style="' . esc_attr($style) . '"' : ''; foreach ($types as $type) { switch ($type) { case 'striped': $class .= ' table-striped'; break; case 'bordered': $class .= ' table-bordered'; break; case 'hover': $class .= ' table-hover'; break; case 'condensed': $class .= ' table-condensed'; break; } } $output .= '<table' . $id . ' class="' . $class . '"' . $style . '>'; foreach ($rows as $row) { switch ($row['rowcolor']) { case 'default': $colorclass = ''; break; case 'blue': $colorclass = ' class="info"'; break; case 'green': $colorclass = ' class="success"'; break; case 'yellow': $colorclass = ' class="warning"'; break; case 'red': $colorclass = ' class="error"'; break; default: $colorclass = ''; break; } $output .= '<tr' . $colorclass . '>'; for ($i = 1; $i <= $columns; $i++) { $output .= '<td>'; $output .= wpautop(do_shortcode(mpt_content_kses(htmlspecialchars_decode($row['column' . $i])))); $output .= '</td>'; } $output .= '</tr>'; } $output .= '</table>'; echo $output; }
function block($instance) { extract($instance); $id = !empty($id) ? ' id="' . esc_attr($id) . '"' : ''; $class = !empty($class) ? ' class="' . esc_attr($class) . '"' : ''; $style = !empty($style) ? ' style="' . esc_attr($style) . '"' : ''; echo '<div' . $id . $class . $style . '>'; if ($title) { echo '<' . $heading . ' class="aq-block-title">' . strip_tags($title) . '</' . $heading . '>'; } echo wpautop(do_shortcode(mpt_content_kses(htmlspecialchars_decode($text)))); echo '</div>'; }
function block($instance) { extract($instance); $output = ''; $id = !empty($id) ? ' id="' . esc_attr($id) . '"' : ''; $userclass = !empty($class) ? ' ' . esc_attr($class) : ''; $style = !empty($style) ? ' ' . esc_attr($style) : ''; $classoutput = ''; switch ($type) { case 'bullet': $classoutput .= ''; $liststyle = 'list-style-type:disc;'; break; case 'number': $classoutput .= ''; $liststyle = 'list-style-type:decimal;'; break; case 'icon': $classoutput .= 'unstyled'; $liststyle = ''; break; case 'unstyled': $classoutput .= 'unstyled'; $liststyle = 'list-style-type:none;'; break; } $classoutput .= $userclass; $output .= !empty($title) ? '<' . $heading . '>' . esc_attr($title) . '</' . $heading . '>' : ''; $output .= '<' . ($type == 'number' ? 'ol' : 'ul') . $id . (!empty($classoutput) ? ' class=" ' . $classoutput . '"' : '') . ' style="' . $liststyle . $style . '">'; if ($type == 'icon') { if (!empty($items)) { foreach ($items as $item) { switch ($item['iconcolor']) { case 'blue': $tagcolor = ' icon-blue'; break; case 'lightblue': $tagcolor = ' icon-lightblue'; break; case 'green': $tagcolor = ' icon-green'; break; case 'yellow': $tagcolor = ' icon-yellow'; break; case 'red': $tagcolor = ' icon-red'; break; case 'white': $tagcolor = ' icon-white'; break; case 'black': $tagcolor = ''; break; } $output .= '<li>'; $output .= '<i class="' . $item['icontype'] . $tagcolor . '"></i> '; $output .= do_shortcode(mpt_content_kses(htmlspecialchars_decode($item['content']))); $output .= '</li>'; } } } else { if (!empty($items)) { foreach ($items as $item) { $output .= '<li>'; $output .= do_shortcode(mpt_content_kses(htmlspecialchars_decode($item['content']))); $output .= '</li>'; } } } $output .= '</' . ($type == 'number' ? 'ol' : 'ul') . '>'; echo $output; }
function block($instance) { extract($instance); $output = ''; $id = !empty($id) ? ' id="' . esc_attr($id) . '"' : ''; $class = !empty($class) ? ' ' . esc_attr($class) : ''; $style = !empty($style) ? ' ' . esc_attr($style) : ''; $btnclass = 'btn'; switch ($btncolor) { case 'grey': $btnclass .= ''; break; case 'blue': $btnclass .= ' btn-primary'; break; case 'lightblue': $btnclass .= ' btn-info'; break; case 'green': $btnclass .= ' btn-success'; break; case 'yellow': $btnclass .= ' btn-warning'; break; case 'red': $btnclass .= ' btn-danger'; break; case 'black': $btnclass .= ' btn-inverse'; break; } switch ($btnsize) { case 'default': $btnclass .= ''; break; case 'large': $btnclass .= ' btn-large'; break; case 'small': $btnclass .= ' btn-small'; break; case 'mini': $btnclass .= ' btn-mini'; break; case 'block': $btnclass .= ' btn-block'; break; } $output .= '<div' . $id . ' class="pricingtable' . ($featured == '1' ? ' featured' : '') . $class . '" style="background: ' . $bgcolor . ';color: ' . $textcolor . ';' . $style . '"">'; $output .= '<h2>' . esc_attr($title); $output .= !empty($subtitle) ? '<br /><span>' . esc_attr($subtitle) . '</span>' : ''; $output .= '</h2>'; $output .= '<ul>'; if (!empty($items)) { foreach ($items as $item) { $output .= '<li>'; $output .= $item['icontype'] == 'none' ? '' : '<i class="' . $item['icontype'] . ($item['iconcolor'] == 'white' ? ' icon-white' : '') . '"></i> '; $output .= do_shortcode(mpt_content_kses(htmlspecialchars_decode($item['content']))); $output .= '</li>'; } } $output .= '</ul>'; $output .= '<h4>' . esc_attr($price) . '</h4>'; if (!empty($btnlink)) { $output .= '<div class="btnclass">'; $output .= '<a href="' . esc_url($btnlink) . '"' . ($btnlinkopen == 'new' ? ' target="_blank"' : '') . '>'; $output .= '<button class="' . $btnclass . '">' . esc_attr($btntext) . '</button>'; $output .= '</a>'; $output .= '</div>'; } $output .= '</div>'; echo $output; }
function block($instance) { extract($instance); $output = ''; $id = !empty($id) ? ' id="' . esc_attr($id) . '"' : ''; $class = !empty($class) ? ' ' . esc_attr($class) : ''; $style = !empty($style) ? ' style="' . esc_attr($style) . '"' : ''; $output .= '<div' . $id . ' class="well well-small well-shadow' . $class . '"' . $style . '>'; $output .= !empty($title) ? '<h5 class="page-header" style="color: ' . $textcolor . ';border-bottom: 1px dashed ' . $textcolor . '">' . esc_attr($title) . '</h5>' : ''; $output .= '<div id="testimonialsCarousel-' . $block_id . '" class="carousel testimonials carousel-fade slide" style="margin-bottom: 0px;">'; $output .= '<div class="carousel-inner">'; if (!empty($items)) { $i = 1; foreach ($items as $item) { $output .= '<div class="' . ($i == 1 ? 'active ' : '') . 'item">'; $output .= '<p><em style="font-size: 0.9em;line-height: 1.5em;opacity: 0.8;">'; $output .= do_shortcode(mpt_content_kses(htmlspecialchars_decode($item['content']))); $output .= '</em></p>'; $output .= !empty($item['photo']) ? '<img src="' . esc_url($item['photo']) . '" class="img-circle pull-left" style="margin-right: 10px;" />' : ''; $output .= '<h4>'; $output .= !empty($item['link']) ? '<a href="' . esc_url($item['link']) . '" target="_blank">' : ''; $output .= do_shortcode(strip_tags($item['title'])); $output .= !empty($item['link']) ? '</a>' : ''; $output .= !empty($item['position']) ? '<br /><small style="font-size: 0.8em;opacity: 0.8;">' : ''; $output .= do_shortcode(strip_tags($item['position'])); $output .= !empty($item['position']) ? '</small>' : ''; $output .= '</h4>'; $output .= '</div>'; $i++; } } $output .= '</div>'; $output .= '</div>'; $output .= '<div class="clear"></div>'; $output .= '<div class="pull-right">'; $output .= '<a class="fade-in-effect" href="#testimonialsCarousel-' . $block_id . '" data-slide="prev"><i class="icon-chevron-left"></i></a>'; $output .= '<a class="fade-in-effect" href="#testimonialsCarousel-' . $block_id . '" data-slide="next"><i class="icon-chevron-right"></i></a>'; $output .= '</div> '; $output .= '<div class="clear"></div>'; $output .= '</div>'; $output .= '<script type="text/javascript">jQuery(document).ready(function () {jQuery(".testimonials").carousel({interval: 4000,pause: "hover"})});</script>'; echo $output; }
function block($instance) { extract($instance); wp_enqueue_script('jquery-ui-tabs'); $output = ''; if ($type == 'tab') { $num = rand(1, 1000); $output .= '<div class="aq_block_tabs">'; $output .= '<ul id="aq_block_tabs_' . $num . '" class="aq-nav cf">'; $i = 1; foreach ($tabs as $tab) { $tab_selected = $i == 1 ? 'active' : ''; $output .= '<li class="' . $tab_selected . '"><a href="#aq-tab-' . sanitize_title($tab['title']) . $i . '" data-toggle="tab" style="background:' . $bgcolor . '; color: ' . $textcolor . '">' . $tab['title'] . '</a></li>'; $i++; } $output .= '</ul>'; $output .= '<div id="aq_block_tabs_' . $num . '" class="tab-content">'; $i = 1; foreach ($tabs as $tab) { $tabs_active = $i == 1 ? ' active' : ''; $output .= '<div id="aq-tab-' . sanitize_title($tab['title']) . $i . '" class="aq-tab tab-pane fade in' . $tabs_active . '" style="background:' . $bgcolor . '; color: ' . $textcolor . '">' . wpautop(do_shortcode(mpt_content_kses(htmlspecialchars_decode($tab['content'])))) . '</div>'; $i++; } $output .= '</div></div>'; $output .= '<script type="text/javascript">jQuery(document).ready(function () {jQuery("#aq_block_tabs_' . $num . '").tab();});</script>'; } elseif ($type == 'toggle') { $output .= '<div class="aq_block_toggles_wrapper">'; foreach ($tabs as $tab) { $num = rand(1, 1000); $output .= '<div class="aq_block_toggle">'; $output .= '<a href="#aq_block_toggles_' . $num . '" data-toggle="collapse">'; $output .= '<h2 class="tab-head" style="background:' . $bgcolor . '; color: ' . $textcolor . '">' . $tab['title'] . '</h2>'; $output .= '<div class="arrow"></div>'; $output .= '</a>'; $output .= '<div id="aq_block_toggles_' . $num . '" class="collapse cf">'; $output .= '<div class="tab-body" style="background: ' . $bgcolor . '; color: ' . $textcolor . ';">'; $output .= wpautop(do_shortcode(mpt_content_kses(htmlspecialchars_decode($tab['content'])))); $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; } $output .= '</div>'; } elseif ($type == 'accordion') { $num = rand(1, 1000); $count = count($tabs); $i = 1; $output .= '<div id="aq_block_accordion_wrapper_' . $num . '" class="aq_block_accordion_wrapper">'; foreach ($tabs as $tab) { $tabnum = rand(1, 1000); $open = $i == 1 ? ' in' : ''; $child = ''; if ($i == 1) { $child = 'first-child'; } if ($i == $count) { $child = 'last-child'; } $i++; $output .= '<div class="aq_block_accordion accordion-group">'; $output .= '<a href="#aq_block_toggles_' . $tabnum . '" data-toggle="collapse" data-parent="#aq_block_accordion_wrapper_' . $num . '">'; $output .= '<h2 class="tab-head" style="background:' . $bgcolor . '; color: ' . $textcolor . '">' . $tab['title'] . '</h2>'; $output .= '<div class="arrow"></div>'; $output .= '</a>'; $output .= '<div id="aq_block_toggles_' . $tabnum . '" class="collapse' . $open . ' cf" style="background: ' . $bgcolor . '; color: ' . $textcolor . '">'; $output .= '<div class="tab-body">'; $output .= wpautop(do_shortcode(mpt_content_kses(htmlspecialchars_decode($tab['content'])))); $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; } $output .= '</div>'; } echo $output; }