'Sidebar', 'before_widget' => '
' . get_the_post_thumbnail($post->ID) . '
' . get_the_content(); } return $content; } add_filter('the_excerpt_rss', 'cwc_rss_post_thumbnail'); add_filter('the_content_feed', 'cwc_rss_post_thumbnail'); // custom menu support add_theme_support( 'menus' ); if ( function_exists( 'register_nav_menus' ) ) { register_nav_menus( array( 'header-menu' => 'Header Menu', 'sidebar-menu' => 'Sidebar Menu', 'logged-in-menu' => 'Logged In Menu', 'top-menu' => 'Top Menu' ) ); } // adds Post Format support // learn more: http://codex.wordpress.org/Post_Formats // add_theme_support( 'post-formats', array( 'aside', 'gallery','link','image','quote','status','video','audio','chat' ) ); // removes detailed login error information for security add_filter('login_errors',create_function('$a', "return null;")); // removes the WordPress version from your header for security function wb_remove_version() { return ''; } add_filter('the_generator', 'wb_remove_version'); // Removes Trackbacks from the comment cout add_filter('get_comments_number', 'comment_count', 0); function comment_count( $count ) { if ( ! is_admin() ) { global $id; $comments_by_type = &separate_comments(get_comments('status=approve&post_id=' . $id)); return count($comments_by_type['comment']); } else { return $count; } } // invite rss subscribers to comment function rss_comment_footer($content) { if (is_feed()) { if (comments_open()) { $content .= 'Comments are open! Add yours!'; } } return $content; } // custom excerpt ellipses for 2.9+ function custom_excerpt_more($more) { return '....Continue Reading »'; } add_filter('excerpt_more', 'custom_excerpt_more'); // no more jumping for read more link function no_more_jumping($post) { return ''.'...Continue Reading »'.''; } add_filter('excerpt_more', 'no_more_jumping'); // category id in body and post class function category_id_class($classes) { global $post; foreach((get_the_category($post->ID)) as $category) $classes [] = 'cat-' . $category->cat_ID . '-id'; return $classes; } add_filter('post_class', 'category_id_class'); add_filter('body_class', 'category_id_class'); // adds a class to the post if there is a thumbnail function has_thumb_class($classes) { global $post; if( has_post_thumbnail($post->ID) ) { $classes[] = 'has_thumb'; } return $classes; } add_filter('post_class', 'has_thumb_class'); //---------------------------- [ Pagenavi Function ] ------------------------------// function wp_pagenavi() { global $wp_query, $wp_rewrite; $pages = ''; $max = $wp_query->max_num_pages; if (!$current = get_query_var('paged')) $current = 1; $args['base'] = str_replace(999999999, '%#%', get_pagenum_link(999999999)); $args['total'] = $max; $args['current'] = $current; $total = 1; $args['mid_size'] = 3; $args['end_size'] = 1; $args['prev_text'] = '«'; $args['next_text'] = '»'; if ($max > 1) echo '';
}
//End Pagenavi
if ( ! function_exists( 'inkhive_comment' ) ) :
/**
* Template for comments and pingbacks.
*
* To override this walker in a child theme without modifying the comments template
* simply create your own inkhive_comment(), and that function will be used instead.
*
* Used as a callback by wp_list_comments() for displaying the comments.
*
* @since Twenty Eleven 1.0
*/
function inkhive_comment( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
switch ( $comment->comment_type ) :
case 'pingback' :
case 'trackback' :
?>
', '' ); ?>