'; if ( function_exists('time_since') ) $output .= sprintf( __('%s ago','k2_domain'), time_since( abs( strtotime( $post->post_date_gmt . ' GMT' ) ), time() ) ); else $output .= get_the_time( get_option('date_format') ); $output .= ''; return $output; } endif; /** * Displays the current post categories * * @since 1.0-RC8 * * @uses k2_nice_category * */ if ( ! function_exists('k2_entry_categories') ): function k2_entry_categories() { return '' . k2_nice_category(', ', __(' and ','k2_domain')) . ''; } endif; /** * Displays the current post author. * Formatted for hAtom microformat. * * @since 1.0-RC8 * */ if ( ! function_exists('k2_entry_author') ): function k2_entry_author() { return '' . get_the_author() . ''; } endif; /** * Displays the current post tags or blank if none. * * @since 1.0-RC8 * */ if ( ! function_exists('k2_entry_tags') ): function k2_entry_tags() { if ( $tags = get_the_tag_list( __('Tags: ','k2_domain'), ', ', '.' ) ) return '' . $tags . ''; return $tags; } endif; /** * Displays the number of comments in current post enclosed in a link. * * @since 1.0-RC8 * */ if ( ! function_exists('k2_entry_comments') ): function k2_entry_comments() { ob_start(); comments_popup_link( __('0 Comments', 'k2_domain'), __('1 Comment', 'k2_domain'), __('% Comments', 'k2_domain'), 'commentslink', __('Closed', 'k2_domain') ); return '' . ob_get_clean() . ''; } endif; /** * Displays the current post time * * @since 1.0-RC8 * */ if ( ! function_exists('k2_entry_time') ): function k2_entry_time() { return '' . get_the_time( get_option('time_format') ) . ''; } endif; /** * Register our sidebar with widgets * * @since 1.0-RC8 * */ if ( ! function_exists('k2_register_sidebars') ): function k2_register_sidebars() { register_sidebars( 2, array( 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' ) ); } endif; /** * Provide page options to wp_get_pages in blocks/k2-header.php * * @since 1.0-RC8 */ if ( ! function_exists('k2_get_page_list_args') ): function k2_get_page_list_args() { $list_args = 'sort_column=menu_order&depth=1&title_li='; // if a page is used as a front page, exclude it from page list if ( get_option('show_on_front') == 'page' ) $list_args .= '&exclude=' . get_option('page_on_front'); return $list_args; } endif; add_shortcode('entry_author', 'k2_entry_author'); add_shortcode('entry_categories', 'k2_entry_categories'); add_shortcode('entry_comments', 'k2_entry_comments'); add_shortcode('entry_date', 'k2_entry_date'); add_shortcode('entry_tags', 'k2_entry_tags'); add_shortcode('entry_time', 'k2_entry_time');