$site_name, 'separator' => $separator, 'content' => $content ); } else { $elements = array( 'content' => $content ); } } else { $elements = array( 'site_name' => $site_name ); } // Filters should return an array $elements = apply_filters('arras_doctitle', $elements); // But if they don't, it won't try to implode if(is_array($elements)) { $doctitle = implode(' ', $elements); } else { $doctitle = $elements; } echo $doctitle; } /** * Based on Thematic's thematic_tag_query() */ function arras_tag_query() { $nice_tag_query = get_query_var('tag'); // tags in current query $nice_tag_query = str_replace(' ', '+', $nice_tag_query); // get_query_var returns ' ' for AND, replace by + $tag_slugs = preg_split('%[,+]%', $nice_tag_query, -1, PREG_SPLIT_NO_EMPTY); // create array of tag slugs $tag_ops = preg_split('%[^,+]*%', $nice_tag_query, -1, PREG_SPLIT_NO_EMPTY); // create array of operators $tag_ops_counter = 0; $nice_tag_query = ''; foreach ($tag_slugs as $tag_slug) { $tag = get_term_by('slug', $tag_slug ,'post_tag'); // prettify tag operator, if any if ($tag_ops[$tag_ops_counter] == ',') { $tag_ops[$tag_ops_counter] = ', '; } elseif ($tag_ops[$tag_ops_counter] == '+') { $tag_ops[$tag_ops_counter] = ' + '; } // concatenate display name and prettified operators $nice_tag_query = $nice_tag_query.$tag->name.$tag_ops[$tag_ops_counter]; $tag_ops_counter += 1; } return $nice_tag_query; } /** * SEO-Friendly META description, based on Thematic Framework. */ function arras_document_description() { if ( class_exists('All_in_One_SEO_Pack') || class_exists('Platinum_SEO_Pack') ) return false; if ( is_single() || is_page() ) { if ( have_posts() ) { while( have_posts() ) { the_post(); echo ''; } } } else { echo ''; } } /** * Generates semantic classes for BODY element. * Sandbox's version was removed from 1.4 onwards. */ function arras_body_class() { if ( function_exists('body_class') ) { $body_class = array('layout-' . arras_get_option('layout'), 'no-js'); if ( !defined('ARRAS_INHERIT_STYLES') || ARRAS_INHERIT_STYLES == true ) { $body_class[] = 'style-' . arras_get_option('style'); } return body_class( apply_filters('arras_body_class', $body_class) ); } } function arras_render_posts($args = null, $display_type = 'default', $taxonomy = 'category') { global $post, $wp_query, $arras_tapestries; if (!$args) { $query = $wp_query; } else { $query = new WP_Query($args); } if ($query->have_posts()) { arras_get_tapestry_callback($display_type, $query, $taxonomy); } 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' ) : ?>
    0) { $query['post__in'] = $stickies; } else { // if no sticky posts are available, return empty value return false; } $key = array_search('-5', $list); unset($list[$key]); } switch($taxonomy) { case 'category': if ( ($zero_cat = array_search('0', $list)) === true ) unset($list[$zero_cat]); $query['category__in'] = $list; break; case 'post_tag': $query['tag__in'] = $list; break; default: $list = implode($list, ','); $query[$taxonomy] = $list; } } $query['post_type'] = $post_type; $query['posts_per_page'] = $count; if (is_home() && arras_get_option('hide_duplicates')) { $query['post__not_in'] = $exclude; } //print_r($query); return $query; } function arras_social_nav() { $feed = arras_get_option('feed_url'); $comments_feed = arras_get_option('comments_feed_url'); ?> ID; } } function arras_constrain_footer_sidebars() { $footer_sidebars = arras_get_option('footer_sidebars'); if ($footer_sidebars == '') $footer_sidebars = 1; $width = ceil(920 / $footer_sidebars); ?> .footer-sidebar { width: px; } '; wp_list_categories('hierarchical=1&orderby=id&hide_empty=1&title_li='); echo ''; } /* End of file template.php */ /* Location: ./library/template.php */