'menu_order', 'container' => null, 'menu_class' => 'sf-menu', 'theme_location' => 'cat-menu' ) ); else : echo ""; endif; } function warrior_menu_pages($depth = '') { global $shortname; if( get_option($shortname.'_wp_nav_menu') == "Yes" ) : wp_nav_menu( array( 'sort_column' => 'menu_order', 'container' => null, 'menu_class' => 'sf-menu', 'theme_location' => 'pages-menu' ) ); else : echo ""; endif; } /** * Warrior Trim Title Function * * Function to cut string/text * @copyright Copyright (c) 2010, Warrior * @param Integer $length Word count * @return String The text after trim */ function warrior_post_title($length, $cut = true) { $title = get_the_title(); mb_strlen( $title ); //echo substr($title, 0, $length); if ( strlen($title) <= $length ){ return $title; } $last_space = strrpos(substr($title, 0, $length), ' '); $cut_text = substr($title, 0, $last_space); if ($cut) { $cut_text .= '...'; } return $cut_text; } /** * Warrior Excerpt Function * * Function to cut title * @copyright Copyright (c) 2010, Warrior * @param Integer $length Word count * @return String The text after trim */ function warrior_excerpt($length, $ending = '...', $cut = true) { $excerpt = get_the_excerpt(); mb_strlen( $excerpt ); echo substr($excerpt, 0, $length); if ( strlen($excerpt) <= $length ){ return $excerpt; } $last_space = strrpos(substr($excerpt, 0, $length), ' '); $cut_text = substr($excerpt, 0, $last_space); if ($cut) { $cut_text .= '...'; } return $cut_text; } /** * Warrior Thumbnail * * Function to display thumbnail using post thumbnail or Timthumb * @copyright Copyright (c) 2010, Warrior */ function warrior_thumbnail($method, $width, $height, $post_thumb_image = '', $image_title = '') { global $post; if ( $method == 'post-thumbnail' ) { if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) { the_post_thumbnail($post_thumb_image); } } elseif ( $method == 'timthumb' ) { if( get_post_meta($post->ID, "thumb", true) ) { $values = get_post_custom_values("thumb"); echo ". $image_title ."; } } elseif ( $method == 'both' ) { if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) { the_post_thumbnail($post_thumb_image); } elseif ( get_post_meta($post->ID, "thumb", true) ) { $values = get_post_custom_values("thumb"); echo ". $image_title ."; } else { echo ". $image_title ."; } } } /** * Warrior Admin Update Link * * Function to display or not display update link * @copyright Copyright (c) 2010, Warrior */ function warrior_admin_update_link() { global $shortname; if( get_option($shortname.'_update_link') == "Yes" ) : edit_post_link(__('Edit Post', 'warrior'), '

', ''); endif; } /** * Warrior Theme Logo * * Function to add logo * @copyright Copyright (c) 2010, Warrior */ function warrior_logo() { global $shortname; if ( get_option($shortname.'_logo') <> "" ) : ?> <?php bloginfo('name'); ?> <?php bloginfo('name'); ?> "" ) : ?> ". $maintenance_text_admin .""; } } /** * Warrior Comments * * Function to load comment list * @copyright Copyright (c) 2010, Warrior */ function warrior_comment_list($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?>

  • comment_approved == '0') : ?>
    '', 'after' => '', 'reply_text' => __('Reply This Comment', 'warrior'), 'depth' => $depth, 'max_depth' => $args['max_depth'] )); ?> ::
  • <?php _e( 'Subscribe feed', 'warrior' ); ?> "" ):?> <?php _e( 'Follow Us on Twitter', 'warrior' ); ?> "" ):?> <?php _e( 'Be Our Fans on Facebook', 'warrior' ); ?> "" ):?> <?php _e( 'MySpace Page', 'warrior' ); ?> "" ):?> <?php _e( 'Linkedin Profile', 'warrior' ); ?> "" ):?> <?php _e( 'Flickr Photos', 'warrior' ); ?> "" ):?> <?php _e( 'YouTube Videos', 'warrior' ); ?> "" ):?> <?php _e( 'Vimeo Videos', 'warrior' ); ?>