__( 'Header Menu', 'tdwowbiscaya' ), 'footer' => __( 'Footer Menu', 'tdwowbiscaya' ), ) ); } endif; add_action( 'after_setup_theme', 'wow_setup' ); /********************************************************************************************* SUPPORT THUMBNAILS *********************************************************************************************/ add_theme_support( 'post-thumbnails' ); if ( function_exists( 'add_theme_support' ) ) { add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 9999, 9999 ); // default Post Thumbnail dimensions } if ( function_exists( 'add_image_size' ) ) { add_image_size( 'category-thumb', 300, 9999 ); //300 pixels wide (and unlimited height) add_image_size( 'recentprojects-thumb', 600, 350, true ); //(cropped) add_image_size( 'blogindex-thumb', 600, 350, true ); //(cropped) add_image_size( 'homeslider-thumb', 9999, 450, true ); //(cropped) add_image_size( 'sticky-thumb', 230, 150, true ); //(cropped) } /********************************************************************************************* EXCERPTS *********************************************************************************************/ function get_custom_excerpt($count){ global $post; $permalink = get_permalink($post->ID); $excerpt = get_the_content(); $excerpt = strip_shortcodes($excerpt); $excerpt = strip_tags($excerpt); $excerpt = substr($excerpt, 0, $count); $excerpt = substr($excerpt, 0, strripos($excerpt, " ")); return $excerpt; } /********************************************************************************************* PAGINATION *********************************************************************************************/ function wow_pagination($pages = '', $range = 2) { $showitems = ($range * 2)+1; global $paged; if(empty($paged)) $paged = 1; if($pages == '') { global $wp_query; $pages = $wp_query->max_num_pages; if(!$pages) { $pages = 1; } } if(1 != $pages) { echo "\n"; } } /********************************************************************************************* NAVIGATION LINKS *********************************************************************************************/ if ( ! function_exists( 'wow_content_nav' ) ) : /** * Display navigation to next/previous pages when applicable */ function wow_content_nav( $nav_id ) { global $wp_query, $post; // Don't print empty markup on single pages if there's nowhere to navigate. if ( is_single() ) { $previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) return; } // Don't print empty markup in archives if there's only one page. if ( $wp_query->max_num_pages < 2 && ( is_home() || is_archive() || is_search() ) ) return; $nav_class = ( is_single() ) ? 'post-navigation' : 'paging-navigation'; ?> 1, ) ); // Count the number of categories that are attached to the posts $all_the_cool_cats = count( $all_the_cool_cats ); set_transient( 'all_the_cool_cats', $all_the_cool_cats ); } if ( '1' != $all_the_cool_cats ) { // This blog has more than 1 category so wow_categorized_blog should return true return true; } else { // This blog has only 1 category so wow_categorized_blog should return false return false; } } /********************************************************************************************* REGISTER WIDGETIZED AREAS *********************************************************************************************/ function wow_widgets_init() { register_sidebar( array( 'name' => __( 'Blog Sidebar', 'tdwowbiscaya' ), 'id' => 'sidebar-1', 'before_widget' => '', ) ); register_sidebar( array( 'name' => __( 'Pages Sidebar', 'tdwowbiscaya' ), 'id' => 'sidebar-2', 'before_widget' => '', ) ); register_sidebar( array( 'name' => __( 'Footer Widgets', 'tdwowbiscaya' ), 'id' => 'footerwidgets', 'before_widget' => '', 'before_title' => '

', 'after_title' => '


', ) ); } add_action( 'widgets_init', 'wow_widgets_init' ); /********************************************************************************************* COMMENTS *********************************************************************************************/ if ( ! function_exists( 'wow_comment' ) ) : /** * Template for comments and pingbacks. * * Used as a callback by wp_list_comments() for displaying the comments. */ function wow_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; if ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) : ?>
  • >
    ', '' ); ?>
  • >
    ', 'tdwowbiscaya' ), sprintf( '%s', get_comment_author_link() ) ); ?>
    comment_approved ) : ?>