$word_limit ) { return implode( ' ', array_slice($words, 0, $word_limit ) ) . " [...]"; } else { return implode( ' ', array_slice( $words, 0, $word_limit ) ); } } // Function to Limit characters of string. function limit_chars( $string, $word_limit ) { $string = preg_replace( "/&#?[a-z0-9]{2,8};/i", "", strip_tags( $string ) ); $words = explode( ' ', $string ); $new_string = substr( $string, 0, $word_limit ); return $new_string; } // Display a temporary title for widgets that do not have one. if ( !function_exists( 'arixwp_widget_title' ) ) { function arixwp_widget_title( $title = NULL ) { return $title == '' ? '( No Title Assigned )' : $title; } add_filter( 'widget_title', 'arixwp_widget_title' ); } // Print the date if ( !function_exists( 'arixwp_date_format' ) ) { function arixwp_date_format() { $arixwp_month = get_the_date('M'); $arixwp_day = get_the_date('d'); // Print the Month echo '

' . $arixwp_month . '' . $arixwp_day . '

'; } } // Determines position of the sidebar. if ( !function_exists( 'arixwp_sidebar_location' ) ) { function arixwp_sidebar_location() { $arixwp_sidebar = get_option( 'arixwp_sidebar' ); $arixwp_sidebar_page = trim( get_post_meta( get_the_ID(),'_arixwp_sidebar_page',TRUE ) ); if ( !$arixwp_sidebar_page || $arixwp_sidebar_page == '' ) $arixwp_sidebar_page = ''; if ( !is_home() && !is_archive() ) { if( $arixwp_sidebar_page ) { if ( $arixwp_sidebar_page == 'left' ) { ?> $is_val ) if( $wp_ver[$i] < $is_val ) return false; return true; } // Insert Google Analytics Code into theme. function arixwp_analytics() { $arixwp_googleid = get_option( 'arixwp_googleid' ); if ( isset( $arixwp_googleid ) && $arixwp_googleid != "" ) { ?> ID), array( 300,300 ), false, '' ); if ( is_multisite() ) { global $blog_id; $wp = 'mu'; $string = '/files'; $replace = '/wp-content/blogs.dir/' . $blog_id . '/files'; $thumbnailSrc = str_replace( $string, $replace, $src[0] ); } else { $wp = 'y'; $thumbnailSrc = $src[0]; } $realThumb = get_template_directory_uri() . '/libs/resizurr.php?m=' . $m . '&w=' . $w . '&h=' . $h . '&a=' . $a . '&q=' . $q . '&src=' . $thumbnailSrc; $thumbnail = ''; echo $thumbnail; } // The Related Post Appearance function arixwp_relatedpost_display() { global $post; global $arixwp_sidebar_page; global $arixwp_sidebar; $title = limit_chars( get_the_title(), 25 ); $excerpt = limit_chars( get_the_excerpt(), 80 ); echo '
  • '; if (has_post_thumbnail()) { // Check if there is a per page option set if ( is_single() ) { if( $arixwp_sidebar_page ) { if( $arixwp_sidebar_page == 'none' ) { arixWP_thumbnail(362, 113, 'shcw', 'top', 100); } else { arixWP_thumbnail(226, 70, 'shcw', 'top', 100); } } else { if( $arixwp_sidebar == 'none' ) { arixWP_thumbnail(362, 113, 'shcw', 'center', 100); } else { arixWP_thumbnail(226, 70, 'shcw', 'center', 100);; } } } } else { echo 'no image'; } echo '

    ' . $title . '...

    ' . $excerpt . '...

  • '; } // Prints out the rlated posts function arixwp_related() { global $post; $arixwp_related_title = get_option( 'arixwp_related_title', __('Read More') ); if ( !$arixwp_related_title || $arixwp_related_title == '' ) $arixwp_related_title = __('Related Posts', THEMENAME); echo ''; } ?>