', ']]>', $raw_content ); return $content; } // the_content format text function the_content_format( $str ){ echo get_the_content_format( $str ); } function is_google_font( $font ){ $notGoogleFont = array( 'Arial', 'Comic Sans MS', 'FreeSans', 'Georgia', 'Lucida Sans Unicode', 'Palatino Linotype', 'Symbol', 'Tahoma', 'Trebuchet MS', 'Verdana' ); if( in_array($font, $notGoogleFont) ){ return false; }else{ return true; } } // subhead section function function sub_head_section( $more ) { $pgs = 0; do { $pgs++; } while ($more > $pgs); return $pgs; } //[clear] function clear_func() { $clr = '
'; return $clr; } add_shortcode( 'clear', 'clear_func' ); //[separator height="20"] function separator_shortcode_func($atts ) { extract( shortcode_atts( array( 'height' => '50', ), $atts ) ); $sptr = '
'; return $sptr; } add_shortcode( 'separator', 'separator_shortcode_func' ); //[column_content]Your content here...[/column_content] function column_content_func( $atts, $content = null ) { extract( shortcode_atts( array( 'type' => '', ), $atts ) ); $colPos = strpos($type, '_last'); if($colPos === false){ $cnt = '
'.$content.'
'; }else{ $type = substr($type,0,$colPos); $cnt = '
'.$content.'
'; } return $cnt; } add_shortcode( 'column_content', 'column_content_func' ); //[hr] function hrule_func() { $hrule = '
'; return $hrule; } add_shortcode( 'hr', 'hrule_func' ); //[hr_top] function hr_top_func() { $hr_top = '
Back to Top
'; return $hr_top; } add_shortcode( 'hr_top', 'hr_top_func' ); // [searchform] function searchform_shortcode_func( $atts ){ return get_search_form( false ); } add_shortcode( 'searchform', 'searchform_shortcode_func' ); // remove excerpt more function new_excerpt_more( $more ) { return '... '; } add_filter('excerpt_more', 'new_excerpt_more'); // get post categories function function getPostCategories(){ $categories = get_the_category(); $catOut = ''; $separator = ', '; $catOutput = ''; if($categories){ foreach($categories as $category) { $catOutput .= 'name ) ) . '">'.$category->cat_name.''.$separator; } $catOut = 'Categories: '.trim($catOutput, $separator); } return $catOut; } // replace last occurance of a string. function str_lreplace($search, $replace, $subject){ $pos = strrpos($subject, $search); if($pos !== false){ $subject = substr_replace($subject, $replace, $pos, strlen($search)); } return $subject; } function skt_pathway_string_limit_words($string, $word_limit){ $words = explode(' ', $string, ($word_limit + 1)); if(count($words) > $word_limit) array_pop($words); return implode(' ', $words); } define('SKT_THEME_URL_DIRECT','http://www.sktthemes.net/themes/skt_pathway_pro/'); ?>