'; } } /** * Generates semantic classes for BODY element. * Sandbox's version was removed from 1.4 onwards. */ function arras_body_class() { if ( function_exists('body_class') ) { return body_class( array('layout-' . arras_get_option('layout'), 'style-' . arras_get_option('style'), 'no-js') ); } } function arras_get_thumbnail($size = 'thumbnail', $id = NULL) { global $post; if ($post) $id = $post->ID; // get post thumbnail (WordPress 2.9) if (function_exists('has_post_thumbnail')) { if (has_post_thumbnail($id)) { return get_the_post_thumbnail($id, $size); } } // go back to legacy (phpThumb or timThumb) $thumbnail = get_post_meta($id, ARRAS_POST_THUMBNAIL, true); if ($thumbnail != '') { switch($size) { case 'sidebar-thumb': $sidebar_thumb_size = arras_get_sidebar_thumb_size(); $w = $sidebar_thumb_size[0]; $h = $sidebar_thumb_size[1]; break; case 'featured-slideshow-thumb': $slideshow_thumb_size = arras_get_slideshow_thumb_size(); $w = $slideshow_thumb_size[0]; $h = $slideshow_thumb_size[1]; break; case 'featured-post-thumb': $w = arras_get_option('featured_thumb_w'); $h = arras_get_option('featured_thumb_h'); break; case 'news-post-thumb': $w = arras_get_option('news_thumb_w'); $h = arras_get_option('news_thumb_h'); break; case 'archive-post-thumb': $w = arras_get_option('news_thumb_w'); $h = arras_get_option('news_thumb_h'); break; default: $w = get_option('thumbnail_size_w'); $h = get_option('thumbnail_size_h'); } return '' . get_the_title() . ''; } return '' . get_the_title() . ''; } function arras_render_posts($args = null, $display_type = 'default', $page_type = 'news') { global $post, $wp_query, $arras_tapestries; if (!$args) { $query = $wp_query; } else { $query = new WP_Query($args); } if ($query->have_posts()) { call_user_func_array( $arras_tapestries[$display_type]['callback'], array($query, $page_type) ); } wp_reset_query(); } function arras_list_trackbacks($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?>
  • id="li-trackback-">
  • id="li-comment-">
    $depth, 'max_depth' => $args['max_depth']))) ?>
    comment_approved == '0' ) : ?>
    ', ']]>', $content); $words = explode(' ', $content, ($limit + 1)); if(count($words) > $limit) { array_pop($words); //add a ... at last article when more than limit word count return implode(' ', $words) . '...'; } else { //otherwise return implode(' ', $words); } } function arras_get_sidebar_thumb_size() { $_default_size = array(36, 36); return apply_filters('arras_sidebar_thumb_size', $_default_size); } function arras_excerpt_more($excerpt) { return str_replace(' [...]', '...', $excerpt); } add_filter('excerpt_more', 'arras_excerpt_more'); function arras_excerpt_length($length) { return 45; } add_filter('excerpt_length', 'arras_excerpt_length'); /* End of file template.php */ /* Location: ./library/template.php */