'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 "', '');
endif;
}
/**
* Warrior Theme Logo
*
* Function to add logo
* @copyright Copyright (c) 2010, Warrior
*/
function warrior_logo() {
global $shortname;
if ( get_option($shortname.'_logo') <> "" ) : ?>
"" ) :
?>
". $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;
?>