' ), '', $content ); $content = str_replace( array( '

' ), '', $content ); return $content; } remove_filter( 'the_content', 'wpautop' ); add_filter( 'the_content', 'wpautop' , 99); add_filter( 'the_content', 'shortcode_unautop',100 ); //FOR TESTIMONIALS if (! function_exists( 'theme_testimonial_shortcode' )) { function theme_testimonial_shortcode($atts, $content = null) { extract( shortcode_atts( array('color' => ''), $atts ) ); //$color = $atts['color']; if ($color != '') { return '
' . do_shortcode($content) . '
'; } else { return '
' . do_shortcode($content) . '
'; } } } add_shortcode('testimonial', 'theme_testimonial_shortcode'); //FOR CITING TESTIMONIALS if (! function_exists( 'theme_testimonial_cite_shortcode' )) { function theme_testimonial_cite_shortcode($atts, $content = null) { return '
' . do_shortcode($content) . '
'; } } add_shortcode('testimonial-cite', 'theme_testimonial_cite_shortcode'); //COLUMN SHORTCODE if (! function_exists( 'theme_column_shortcode' )) { function theme_column_shortcode($atts, $content = null) { extract( shortcode_atts( array( 'class' => '', 'offset' => '', 'background' => '', 'color' => '', ), $atts ) ); if ($class == '') { $class = 'c100'; } $column = '
'; return $column; } } add_shortcode('column', 'theme_column_shortcode'); //ENDING A COLUMN SECTION if (! function_exists( 'theme_endcolumns_shortcode' )) { function theme_endcolumns_shortcode() { return "
"; } } add_shortcode('end_columns', 'theme_endcolumns_shortcode'); //INSERT ICON name, size, alignment, color if (! function_exists( 'theme_icon_shortcode' )) { function theme_icon_shortcode($atts) { extract( shortcode_atts( array( 'name' => '', 'size' => '', 'alignment' => '', 'color' => '', ), $atts ) ); if ($name) { $icon_name = 'icon-' . $name; } else { $icon_name = 'icon-cog'; } if ($alignment == 'inline') { $icon_alignment = 'icon-font-inline'; } else { $icon_alignment = 'icon-font-center'; } $content = ''; return $content; } } add_shortcode('button', 'theme_button_shortcode'); //DROPCAPS if (! function_exists( 'theme_dropcap_shortcode' )) { function theme_dropcap_shortcode($atts, $content = null) { extract( shortcode_atts( array( 'color' => '' ), $atts ) ); $dropcap = ''; return $dropcap; } } add_shortcode('dropcap', 'theme_dropcap_shortcode'); //INSERT SLIDESHOW -- Order by 'newest,' 'oldest,' or 'random' if (! function_exists( 'theme_slideshow_shortcode' )) { function theme_slideshow_shortcode($atts) { extract( shortcode_atts( array( 'slideset' => '', 'order' => '', ), $atts ) ); if (!$slideset) { return; } if ((!$order) || ($order == 'newest') || ($order == 'DESC') || ($order == 'desc') || ($order == 'descending')) { $query_order = 'DESC'; $query_orderby = 'date'; } elseif (($order == 'oldest') || ($order == 'ASC') || ($order == 'asc') || ($order == 'oldest')) { $query_order = 'ASC'; $query_orderby = 'date'; } elseif (($order == 'random') || ($order == 'rand')) { $query_order = 'DESC'; $query_orderby = 'rand'; } $slidername = 'slider-' . str_replace (' ', '', $slideset); $content = '
'; $content .= '
    '; $args = array ( 'post_type' => 'slideshow', 'post_status' => 'published', 'slide_set' => $slideset, 'order' => $query_order, 'orderby' => $query_orderby, ); $query = new WP_Query( $args ); if ( $query->have_posts() ) { while ( $query->have_posts() ) : $query->the_post(); $content .= '
  • '; $rawcontent = get_the_content(); $rawcontent = apply_filters('the_content', $rawcontent); $rawcontent = str_replace(']]>', ']]>', $rawcontent); $content .= '
    ' . $rawcontent . '
    '; $content .= '
  • '; endwhile; } else { return; } $content .= '
'; $content .= '
'; //theme_slideshow_headerscript($slidername, $directionnav, $controlnav, $pausebutton, $auto, $interval, $smoothheight, $effect); return $content; } } add_shortcode('slideshow', 'theme_slideshow_shortcode'); /*if (! function_exists( 'theme_slideshow_headerscript' )) { function theme_slideshow_headerscript($slidername='', $directionnav='false', $controlnav='true', $pausebutton='false', $auto='true', $interval='7000', $smoothheight='false', $effect='slide') { if ($slidername == ''){ $sliderid = '.flexslider'; } else { $sliderid = '#' . $slidername; } if ($effect != 'fade') { $effect = 'slide'; } if ($directionnav != 'true') { $directionnav = 'false'; } if ($controlnav != 'false') { $controlnav = 'true'; } if ($pausebutton != 'true') { $pausebutton = 'false'; } if ($auto != 'false') { $auto = 'true'; } if ($smoothheight != 'true') { $smoothheight = 'false'; } $flexscript = ''; return $flexscript; } } add_action('wp_print_footer_scripts', 'theme_slideshow_headerscript');*/