>>> DO NOT EDIT THIS FILE <<<< * * Warning! DO NOT EDIT THIS FILE, or any other theme file! If you edit ANY theme * file, all your changes will be LOST when you update the theme to a newer version. * Instead, if you need to change theme functionality, CREATE A CHILD THEME! * * >>>> DO NOT EDIT THIS FILE <<<< * * Sets up the theme and provides some helper functions. Some helper functions * are used in the theme as custom template tags. Others are attached to action and * filter hooks in WordPress to change core functionality. * * The first function, aspen_setup(), sets up the theme by registering support * for various features in WordPress, such as post thumbnails, navigation menus, and the like. * * When using a child theme (see http://codex.wordpress.org/Theme_Development and * http://codex.wordpress.org/Child_Themes), you can override certain functions * (those wrapped in a function_exists() call) by defining them first in your child theme's * functions.php file. The child theme's functions.php file is included before the parent * theme's file, so the child theme functions would be used. * * Functions that are not pluggable (not wrapped in function_exists()) are instead attached * to a filter or action hook. The hook can be removed by using remove_action() or * remove_filter() and you can attach your own function to the hook. * * We can remove the parent theme's hook only after it is attached, which means we need to * wait until setting up the child theme: * * * add_action( 'after_setup_theme', 'my_child_theme_setup' ); * function my_child_theme_setup() { * // We are providing our own filter for excerpt_length (or using the unfiltered value) * remove_filter( 'excerpt_length', 'aspen_excerpt_length' ); * ... * } * * * For more information on hooks, actions, and filters, see http://codex.wordpress.org/Plugin_API. * * @package WordPress * @subpackage Aspen * @since Aspen 1.0 * * This file formatted 4/8 on tabs * * >>>> DO NOT EDIT THIS FILE <<<< */ /** * Set the content width based on the theme's design and stylesheet. */ if ( ! isset( $content_width ) ) $content_width = 705; // 940 * .75 /** * Tell WordPress to run aspen_setup() when the 'after_setup_theme' hook is run. */ add_action( 'after_setup_theme', 'aspen_setup' ); if ( ! function_exists( 'aspen_setup' ) ) { /** * Sets up theme defaults and registers support for various WordPress features. * * Note that this function is hooked into the after_setup_theme hook, which runs * before the init hook. The init hook is too late for some features, such as indicating * support post thumbnails. * * To override aspen_setup() in a child theme, add your own aspen_setup to your child theme's * functions.php file. * * @uses load_theme_textdomain() For translation/localization support. * @uses add_editor_style() To style the visual editor. * @uses add_theme_support() To add support for post thumbnails, automatic feed links, and Post Formats. * @uses register_nav_menus() To add support for navigation menus. * @uses register_default_headers() To register the default custom header images provided with the theme. * @uses set_post_thumbnail_size() To set a custom post thumbnail size. * * @since Aspen 1.0 * * @uses add_theme_support( 'custom-header', $aspen_header ) for WP 3.4+ custom header */ function aspen_setup() { /* Make Aspen available for translation. */ $tpath = trailingslashit(get_template_directory()); load_theme_textdomain( 'aspen', $tpath . 'languages' ); $locale = get_locale(); $locale_file = $tpath . "languages/$locale.php"; if ( is_readable( $locale_file ) ) require_once( $locale_file ); // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style(); // Add default posts and comments RSS feed links to . add_theme_support( 'automatic-feed-links' ); // Aspen supports two main nav menus and an alternate mobile menu register_nav_menus( array( 'primary' => 'Primary Navigation: if specified, used instead of Default menu', 'secondary' => 'Secondary Navigation: if specified, adds 2nd menu bar' ) ); // Add support for a variety of post formats add_theme_support( 'post-formats', array( 'aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'status','video') ); // This theme uses Featured Images (also known as post thumbnails) for per-post/per-page Custom Header images add_theme_support( 'post-thumbnails' ); // now, need Aspen settings available for everything else aspen_init_opts('functions'); $width = aspen_getopt('theme_width_int'); if (!$width) $width = 940; $height = aspen_getopt('header_image_height_int'); global $aspen_header; $aspen_header = array( 'default-image' => '%s/images/headers/maroon-bells.jpg', 'random-default' => true, 'width' => $width, 'height' => $height, 'flex-height' => true, 'flex-width' => true, 'default-text-color' => '', 'header-text' => false, 'uploads' => true, 'wp-head-callback' => '', 'admin-head-callback' => 'aspen_admin_header_style', 'admin-preview-callback' => '', ); global $content_width; $content_width = $width; // let the WP $content_width be the same as theme width, and let our responsive CSS make it work. if (function_exists('get_custom_header')) { add_theme_support( 'custom-header', $aspen_header ); add_theme_support( 'custom-background' ); } // We'll be using post thumbnails for custom header images on posts and pages. // We want them to be the size of the header image that we just defined // Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php. set_post_thumbnail_size( $aspen_header['width'], $aspen_header['height'], true ); // Add Aspen's custom image sizes add_image_size( 'large-feature', $aspen_header['width'], $aspen_header['height'], true ); // Used for large feature (header) images add_image_size( 'small-feature', 500, 300 ); // Used for featured posts if a large-feature doesn't exist // ... and thus ends the changeable header business. aspen_register_header_images(); } } // aspen_setup function aspen_admin_init_cb() { // action definition aspen_sapi_options_init(); // This must come first as it hooks update_option used elsewhere return; } if ( ! function_exists('aspen_init_opts')) { function aspen_init_opts($who='') { // this sets the essential values. These are the minimally required values to get the theme Preview to work. $defaults = array( 'theme_width_int' => 940, /* should all be the same */ 'header_image_height_int' => 188, 'aspen_version_id' => ASPEN_VERSION_ID, 'style_version' => 1, 'site_margins_int' => 20, 'site_fontsize_int' => 12, 'infobar_location' => 'top', 'themename' => 'none-preview', 'sb_right_1_col_width_int' => '25', 'sb_right_2_col_width_int' => '33', 'sb_left_1_col_width_int' => '25', 'sb_left_2_col_width_int' => '33', 'sb_split_left_width_int' => '17', 'sb_split_right_width_int' => '17', 'sb_2_left_area_int' => '55' ); $changed = false; /* initialize other stuff that needs a value */ /* now if there were no settings, need to fill in the default theme and Section and SEO default */ foreach ($defaults as $opt => $val) { $optval = aspen_getopt($opt); if ((!$optval && $optval !== '0')) { $changed = true; aspen_setopt($opt,$val,false); // set, don't save } } if ($changed) { aspen_save_opts('aspen_init_opts',false); // changed some things, so re-save } do_action('aspen_init_opts'); } } if (! function_exists( 'aspen_register_header_images')) { function aspen_register_header_images() { // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI. register_default_headers( array( 'maroon-bells' => array( 'url' => '%s/images/headers/maroon-bells.jpg', 'thumbnail_url' => '%s/images/headers/maroon-bells-thumbnail.jpg', /* translators: header image description */ 'description' => aspen_t_( 'Maroon Bells' /*a*/ ) ), 'aspen-grove' => array ( 'url' => "%s/images/headers/aspen-grove.jpg", 'thumbnail_url' => "%s/images/headers/aspen-grove-thumbnail.jpg", 'description' => aspen_t_( 'Aspen Grove' /*a*/ ) ), 'mountain-stream' => array( 'url' => '%s/images/headers/mountain-stream.jpg', 'thumbnail_url' => '%s/images/headers/mountain-stream-thumbnail.jpg', /* translators: header image description */ 'description' => aspen_t_( 'Mountain Stream' /*a*/ ) ), 'mum' => array ( 'url' => "%s/images/headers/mum.jpg", 'thumbnail_url' => "%s/images/headers/mum-thumbnail.jpg", 'description' => aspen_t_( 'Mum' /*a*/ ) ), 'sopris' => array ( 'url' => "%s/images/headers/sopris.jpg", 'thumbnail_url' => "%s/images/headers/sopris-thumbnail.jpg", 'description' => aspen_t_( 'Sopris' /*a*/ ) ) ) ); } } if ( ! function_exists( 'aspen_header_style' ) ) { /** * Styles the header image and text displayed on the blog * * @since Aspen 1.0s */ function aspen_header_style() { // we don't need to do anything } } // aspen_header_style if ( ! function_exists( 'aspen_admin_header_style' ) ) { /** * Styles the header image displayed on the Appearance > Header admin panel. * @since Aspen 1.0 */ function aspen_admin_header_style() { global $aspen_header; ?> Featured Images at least as wide as default header image will be used as a replacement for default image for this page or post. Smaller images used as "thumbnail" at beginning of Page/Post.

'; } add_filter('admin_post_thumbnail_html','aspen_featured_image_info'); /** * Sets the post excerpt length to 40 words. * * To override this length in a child theme, remove the filter and add your own * function tied to the excerpt_length filter hook. */ function aspen_excerpt_length( $length ) { $val = aspen_t_get('excerpt_length'); if (!$val) $val = aspen_getopt('excerpt_length'); if ($val > 0 || $val === '0') return $val; return 40; } add_filter( 'excerpt_length', 'aspen_excerpt_length' ); /** * Returns a "Continue Reading" link for excerpts */ if ( ! function_exists('aspen_continue_reading_link')) { function aspen_continue_reading_link($add_a = true) { $rep = aspen_t_get('more_msg'); if (!$rep) $rep = aspen_getopt('excerpt_more_msg'); if (!empty($rep)) $msg = $rep; else $msg = __( 'Continue reading ','aspen'); if ($add_a) return ' ' . $msg . ''; else return $msg; } } /** * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and aspen_continue_reading_link(). * * To override this in a child theme, remove the filter and add your own * function tied to the excerpt_more filter hook. */ function aspen_auto_excerpt_more( $more ) { return ' …' . aspen_continue_reading_link(); } add_filter( 'excerpt_more', 'aspen_auto_excerpt_more' ); /** * Adds a pretty "Continue Reading" link to custom post excerpts. * * To override this link in a child theme, remove the filter and add your own * function tied to the get_aspen_the_excerpt_featured filter hook. */ function aspen_custom_excerpt_more( $output ) { if ( has_excerpt() && !is_attachment() ) { $output .= aspen_continue_reading_link(); } return $output; } add_filter( 'the_excerpt', 'aspen_custom_excerpt_more' ); if ( ! function_exists('aspen_trim_excerpt') ) { function aspen_trim_excerpt($text = '') { $raw_excerpt = $text; if ( '' == $text ) { $text = get_the_content(''); $orig_text_len = strlen($text); $text = strip_shortcodes( $text ); // $stripped_text_len = strlen($text); $text = apply_filters('the_content', $text); $text = str_replace(']]>', ']]>', $text); $excerpt_length = apply_filters('excerpt_length', 55); $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]'); $text = wp_trim_words( $text, $excerpt_length, $excerpt_more ); $stripped_text_len = strlen($text); } if ('' == $raw_excerpt && $orig_text_len > $stripped_text_len && get_post_format() == '') { // have stripped shortcodes if ( strpos($text,$excerpt_more) === false) $text .= $excerpt_more; } return apply_filters('wp_trim_excerpt', $text, $raw_excerpt); } } remove_filter( 'get_the_excerpt', 'wp_trim_excerpt' ); add_filter( 'get_the_excerpt', 'aspen_trim_excerpt' ); /** * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link. * * To override this in a child theme, remove the filter and optionally add * your own function tied to the wp_page_menu_args filter hook. */ function aspen_page_menu_args( $args ) { if (aspen_getopt('menu_nohome')) $args['show_home'] = false; else $args['show_home'] = true; // look for pages to hide from menu $ex_list = ''; $hide_pages = get_pages(array('hierarchical' => 0, 'meta_key' => 'pp_hide_on_menu')); // get list of excluded pages if (!empty($hide_pages)) { foreach ($hide_pages as $page) { $ex_list .= $page->ID . ','; /* trailing , doesn't matter */ } } if ($ex_list != '') $args['exclude'] = $ex_list; return $args; } add_filter( 'wp_page_menu_args', 'aspen_page_menu_args' ); /** * Register our sidebars and widgetized areas. * * @since Aspen 1.0 */ function aspen_widgets_init() { // Big Top located at the top of the sidebar. aspen_register_sidebar( aspen_t_( 'Primary (top) Sidebar' /*a*/ ), 'primary-widget-area', aspen_t_( 'Primary (top) sidebar widget area, displays above Upper Sidebar (or Left+Right for multi-column layouts).' /*a*/ )); // Primary located at the top of the sidebar. aspen_register_sidebar( aspen_t_( 'Upper/Right Sidebar' /*a*/ ), 'right-widget-area', aspen_t_( 'The Upper Sidebar - or Right Sidebar for multi-column layouts.' /*a*/ )); // Lower/Left located below the Primary Widget Area in the sidebar. Empty by default. aspen_register_sidebar( aspen_t_( 'Lower/Left Sidebar' /*a*/ ), 'left-widget-area', aspen_t_( 'The Lower Sidebar - or Left Sidebar for multi-column layouts.' /*a*/ )); // Mobile device aspen_register_sidebar(aspen_t_( 'Mobile Device Widget Area' /*a*/ ), 'mobile-widget-area', aspen_t_( 'This widget area provides an alternate area for Mobile Devices. It is displayed between the content and the footer, and uses the same styling as the Primary (top) Sidebar.' /*a*/ )); ## Site-wide top area aspen_register_sidebar(aspen_t_( 'Sitewide Top Widget Area' /*a*/ ), 'sitewide-top-widget-area', aspen_t_( 'This widget area appears at the top of the content area on all site static pages and post pages (including special post pages) EXCEPT pages using the blank or iframe page templates.' /*a*/ )); ## Site-wide bottom area aspen_register_sidebar(aspen_t_( 'Sitewide Bottom Widget Area' /*a*/ ), 'sitewide-bottom-widget-area', aspen_t_( 'This widget area appears at the bottom of the content area on all site static pages and post pages (including special post pages) EXCEPT pages using the blank or iframe page templates.' /*a*/ )); ## page top widget area aspen_register_sidebar(aspen_t_( 'Pages Top Widget Area' /*a*/ ), 'top-widget-area', aspen_t_( 'The top widget area appears above the content area of pages. It is not displayed on archive-like post pages (archives, etc.).' /*a*/ )); ## page bottom widget area aspen_register_sidebar(aspen_t_( 'Pages Bottom Widget Area' /*a*/ ), 'bottom-widget-area', aspen_t_( 'The bottom widget area appears below the content area. It is not displayed on archive-like post pages.' /*a*/ )); ## posts top widget area aspen_register_sidebar(aspen_t_( 'Blog Top Widget Area' /*a*/ ), 'blog-top-widget-area', aspen_t_( 'The blog top widget area appears above the content area of blog pages, including page with posts templates. It is not displayed on archive-like post pages.' /*a*/ )); ## posts blog bottom widget area aspen_register_sidebar(aspen_t_( 'Blog Bottom Widget Area' /*a*/ ), 'blog-bottom-widget-area', aspen_t_( 'The blog bottom widget area appears below the content area of blog pages, including page with posts templates. It is not displayed on archive-like post pages.' /*a*/ )); ## Special Post Pages Top Widget area aspen_register_sidebar(aspen_t_( 'Archive-like Pages Top Widget Area' /*a*/ ), 'postpages-widget-area', aspen_t_( 'This widget area will appear at the top of archive-like post pages (archives, attachment, author, category, single post).' /*a*/ )); // Area 3, located in the footer. Empty by default. aspen_register_sidebar( aspen_t_( 'First Footer Widget Area' /*a*/ ), 'first-footer-widget-area', aspen_t_( 'The first footer widget area. Note: Footer widget areas auto-adujust width depending on how many areas you use.' /*a*/ )); // Area 4, located in the footer. Empty by default. aspen_register_sidebar(aspen_t_( 'Second Footer Widget Area' /*a*/ ), 'second-footer-widget-area', aspen_t_( 'The second footer widget area' /*a*/ )); // Area 5, located in the footer. Empty by default. aspen_register_sidebar(aspen_t_( 'Third Footer Widget Area' /*a*/ ), 'third-footer-widget-area', aspen_t_( 'The third footer widget area' /*a*/ )); aspen_register_sidebar(aspen_t_( 'Fourth Footer Widget Area' /*a*/ ), 'fourth-footer-widget-area', aspen_t_( 'The fourth footer widget area' /*a*/ )); } add_action( 'widgets_init', 'aspen_widgets_init' ); if ( ! function_exists('aspen_register_sidebar')) { /** * Register widgetized areas: two default sidebars, two content areq sidebars, * a top area for specialized post pages, alternative sidebar for template pages, * and a header widget area. * * To override aspen_widgets_init() in a child theme, remove the action hook and add your own * function tied to the init hook. * * @uses register_sidebar */ function aspen_register_sidebar($name, $id, $desc, $altclass='') { if ($altclass != '') $altclass .= ' '; register_sidebar( array( 'name' => '• ' . $name, /* the • makes our names closer to unique */ 'id' => $id, 'description' => $desc, 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } } if ( ! function_exists('aspen_inject_area')) { function aspen_inject_area($name) { $area_name = '' . $name . '_insert'; $hide_front = 'hide_front_' . $name; $hide_rest = 'hide_rest_' . $name; $idinj = 'inject_' . $name; $html = aspen_getopt($area_name); $per_page_code = aspen_get_per_page_value($name); /* per page values */ if (!empty($html) || !empty($per_page_code)) { if ($name !='postpostcontent') echo("\t
\n"); else echo("\t
\n"); if (!empty($html)) { /* area insert defined? */ if (is_front_page()) { aspen_e_notopt($hide_front,do_shortcode($html)); } else { aspen_e_notopt($hide_rest,do_shortcode($html)); } } if (!empty($per_page_code)) { echo(do_shortcode($per_page_code)); } echo("\t
\n"); } } } if ( ! function_exists('aspen_content_nav')) { /** * Display navigation to next/previous pages when applicable */ function aspen_content_nav( $nav_id , $from_search=false) { global $wp_query; if ( $wp_query->max_num_pages > 1 ) { ?>
\n"; } else if (aspen_getopt('nav_style') == 'paged_right') { echo ("\t
"); if (function_exists ('wp_pagenavi')) { wp_pagenavi(); } else if ( function_exists( 'wp_paginate' ) ) { wp_paginate( 'title=' ); } else { echo aspen_get_paginate_archive_page_links( 'plain',2,3 ); } echo "\t
\n"; } else { // Older/Newer posts ?>
]*?href=[\'"](.+?)[\'"]/is', get_the_content(), $matches ) ) return false; return esc_url_raw( $matches[1] ); } } /** * Count the number of footer sidebars to enable dynamic classes for the footer */ if ( ! function_exists('aspen_footer_sidebar_class')) { function aspen_footer_sidebar_class() { $count = 0; if ( is_active_sidebar( 'first-footer-widget-area' ) ) $count++; if ( is_active_sidebar( 'second-footer-widget-area' ) ) $count++; if ( is_active_sidebar( 'third-footer-widget-area' ) ) $count++; if ( is_active_sidebar( 'fourth-footer-widget-area' ) ) $count++; $class = ''; switch ( $count ) { case '1': $class = 'one'; break; case '2': $class = 'two'; break; case '3': $class = 'three'; break; case '4': $class = 'four'; break; } if ( $class ) echo 'class="' . $class . '"'; } } if ( ! function_exists( 'aspen_comment' ) ) { /** * Template for comments and pingbacks. * * To override this walker in a child theme without modifying the comments template * simply create your own aspen_comment(), and that function will be used instead. * * Used as a callback by wp_list_comments() for displaying the comments. * * @since Aspen 1.0 */ function aspen_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) { case 'pingback' : case 'trackback' : ?>
  • ', '' ); ?>

  • id="li-comment-" >
    comment_parent ) $avatar_size = 32; echo get_avatar( $comment, $avatar_size ); /* translators: 1: comment author, 2: date and time */ printf( __( '%1$s on %2$s said:','aspen'), sprintf( '%s', get_comment_author_link() ), sprintf( '', esc_url( get_comment_link( $comment->comment_ID ) ), get_comment_time( 'c' ), /* translators: 1: date, 2: time */ sprintf( __( '%1$s at %2$s','aspen'), get_comment_date(), get_comment_time() ) ) ); edit_comment_link( __( 'Edit','aspen'), '', '' ); ?>
    comment_approved == '0' ) : ?>
    __( 'Reply ','aspen'), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); if ($rl != '') { ?>
    '; $after = ''; $link = __( 'Edit','aspen'); $id = 0; if ( !$post = get_post( $id ) ) return; if ( !$url = get_edit_post_link( $post->ID ) ) return; $post_type_obj = get_post_type_object( $post->post_type ); $link = '' . $link . ''; $edit = $before . apply_filters( 'edit_post_link', $link, $post->ID ) . $after; if ('echo' == $echo) echo $edit; else return $edit; } } if ( !function_exists( 'aspen_link_pages')) { function aspen_link_pages() { wp_link_pages( array( 'before' => '' ) ); } } // ===================================== Aspen Page / Post Sections ========================= // for pages... if ( !function_exists( 'aspen_page_title')) { function aspen_page_title() { // The page title ?>

    " . $format_title . "\n"; aspen_post_title('

    ', '

    '); ?>
    ", esc_url(aspen_relative_url('images/icons/yellow-star.png'))); } if ( ( 'page' == get_post_type() && !is_search() && !is_archive()) || $single == 'single') { echo("\t\t" . $before); the_title(); } else { echo("\t\t" . $before); ?>
    chat - %s', esc_url( get_permalink() ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_time() )); ?> \n\t\t\t"; $po .= sprintf( __( 'Posted on by ','aspen'), esc_url( get_permalink() ), esc_attr( get_the_time() ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), sprintf( esc_attr(__( 'View all posts by %s','aspen')), get_the_author() ), esc_html( get_the_author() ) ); if ( (aspen_getopt('show_post_avatar') || aspen_is_checked_post_opt('pp_show_post_avatar') || aspen_t_get('show_avatar')) && aspen_getopt('show_tiny_avatar')) { $po .= ''; $po .= get_avatar( get_the_author_meta('user_email') ,22,null,'avatar' ); $po .= ''; } $po .= "\n\t\t\t"; echo apply_filters('aspen_posted_on',$po, $type); } } if (! function_exists('aspen_format_posted_on_footer')) { function aspen_format_posted_on_footer($who) { if (aspen_is_checked_post_opt('pp_hide_bottom_post_meta') || aspen_is_checked_page_opt('pp_hide_infobot')) { aspen_edit_link(); return; } ?> \n"; if ($type == 'single') { /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list( __( ', ','aspen') ); /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', __( ', ','aspen') ); if ( '' != $tags_list ) { $utility_text = __( 'This entry was posted in %1$s and tagged %2$s by %5$s. Bookmark the permalink.','aspen'); } elseif ( '' != $categories_list ) { $utility_text = __( 'This entry was posted in %1$s by %5$s. Bookmark the permalink.','aspen'); } else { $utility_text = __( 'This entry was posted by %5$s. Bookmark the permalink.','aspen'); } if (aspen_meta_icons_class() == '') { // not showing icons $pi .= sprintf( $utility_text, $categories_list, $tags_list, esc_url( get_permalink() ), the_title_attribute( 'echo=0' ), get_the_author(), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) ); } else { if ( $categories_list ) { $cat_count = count( get_the_category() ); if ($cat_count < 2 && aspen_getopt_checked('hide_singleton_cat')) $pi .= "\t\t\t\n"; else $pi .="\t\t\t\n"; $pi .= sprintf( __( 'Posted in %2$s','aspen'), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); $pi .="\t\t\t\n"; } // End if categories /* translators: used between list items, there is a space after the comma */ if ($tags_list ) { $pi .="\t\t\t\n"; $pi .= sprintf( __( 'Tagged %2$s','aspen'), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); $pi .= "\t\t\t\n"; } // End if $tags_list $pi .= '' . __('permalink','aspen') . ''; } // end not showing icons $pi .= aspen_edit_link('noecho'); } else if ($type == 'reply') { $dummy = true; } else { // else not single $show_sep = false; if ( 'page' != get_post_type() ) { // Hide category and tag text for pages on Search /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list( __( ', ','aspen') ); $cat_count = count( get_the_category() ); $skip = ($cat_count < 2 && aspen_getopt_checked('hide_singleton_cat')); if ( $categories_list && !$skip) { $pi .= ''; $pi .= sprintf( __( 'Posted in %2$s','aspen'), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); $show_sep = true; $pi .= ''; } // End if categories /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', __( ', ','aspen') ); if ( $tags_list ) { if ( $show_sep ) { $pi .= ' | '; } // End if $show_sep $pi .= ''; $pi .= sprintf( __( 'Tagged %2$s','aspen'), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); $show_sep = true; $pi .= ''; } // End if $tags_list } // End if 'page' != get_post_type() if ( comments_open() ) { if ( $show_sep ) { $pi .= ' | '; } // End if $show_sep $pi .= ''; ob_start(); // yuck - why doesn't WP make all the utilities have an echo option?? comments_popup_link( '' . __( 'Leave a reply','aspen') . '', __( '1 Reply','aspen'), __( '% Replies','aspen') ); $pi .= ob_get_clean(); $pi .= ''; } // End if comments_open() $pi .= aspen_edit_link('noecho'); } // end non-single $pi .= "\n"; echo apply_filters('aspen_posted_in',$pi,$type); } } if ( ! function_exists( 'aspen_post_top_info' ) ) { /** * Prints HTML with meta information for the top meta line. * * @since Aspen 1.0 */ function aspen_post_top_info($type='') { // $type for single aspen_posted_on($type); } } if ( ! function_exists( 'aspen_post_bottom_info' ) ) { /** * Prints HTML with meta information for the bottom meta line. * * @since Aspen 1.0 */ function aspen_post_bottom_info($type='') { aspen_posted_in($type); } } if ( ! function_exists( 'aspen_comments_popup_link' ) ) { function aspen_comments_popup_link() { /* display comment bubble for posts */ if ( !aspen_getopt_checked('pp_hide_post_bubble') && !aspen_is_checked_post_opt('pp_hide_post_bubble') && comments_open() && ! post_password_required() ) { ?> \n"; return true; } return false; } } if ( ! function_exists('aspen_use_fi_in_content')) { function aspen_use_fi_in_content($page_type = 'post') { global $aspen_header; $default = 'thumbnail'; $width = ''; if (get_post_thumbnail_id()) { $image = wp_get_attachment_image_src( get_post_thumbnail_id( ), 'full' ); // (url, width, height) $href = $image[0]; if ($image[1] < $aspen_header['width'] || aspen_getopt('hide_featured_header')) { switch ($page_type) { case 'page': $default = 'medium'; // medium is default for pages $width = aspen_getopt('featured_page_width'); $size = aspen_getopt('fi_size_page'); break; case 'single': $default = 'medium'; // medium is default for single posts $width = aspen_getopt('featured_single_width'); $size = aspen_getopt('fi_size_post_single'); break; default: // excerpts $width = aspen_getopt('featured_blog_width'); $size = aspen_getopt('fi_size_post'); $href = get_permalink(); break; } if ($width != '0') { // don't emit any FI if the width is explicit set to 0 if (empty($size)) $size = $default; ?> = 2 || $page >= 2 ) && aspen_post_count() <= $n1) return false; } $pwp = aspen_get_per_page_value('wvr_pwp_type'); if ($pwp == 'full') // need to check before archive/search return false; // override global setting if ($pwp == 'excerpt') return true; // override global setting if (is_search()) { return !aspen_getopt_checked('fullpost_search'); } if (is_archive()) { return !aspen_getopt_checked('fullpost_archive'); } return aspen_getopt_checked('excerpt_blog'); } } if ( ! function_exists('aspen_page_menu')) { function aspen_page_menu() { /* handle sf-menu for wp_page_menu */ $menu = wp_page_menu(array('echo' => false)); if ( aspen_use_sf() ) { $ulpos = stripos($menu, '