section add_theme_support('automatic-feed-links') ; // Load jQuery if ( !function_exists('core_mods') ) { function core_mods() { if ( !is_admin() ) { wp_deregister_script('jquery'); wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js")); wp_register_script('stumblr.functions', (get_template_directory_uri()."/js/functions.js"),'jquery',false,true); wp_enqueue_script('jquery'); wp_enqueue_script('stumblr.functions'); } } core_mods(); } // content width if ( !isset( $content_width )) { $content_width = 700; } // clean up the function removeHeadLinks() { remove_action('wp_head', 'rsd_link'); remove_action('wp_head', 'wlwmanifest_link'); } add_action('init', 'removeHeadLinks'); remove_action('wp_head', 'wp_generator'); // Stumblr post thumbnails add_theme_support( 'post-thumbnails' ); add_image_size('stumblr-large-image', 740, 9999); // menu fallback function stumblr_addmenus() { register_nav_menus( array( 'main_nav' => 'Main Menu', ) ); } add_action( 'init', 'stumblr_addmenus' ); function stumblr_nav() { if ( function_exists( 'wp_nav_menu' ) ) wp_nav_menu( 'menu=main_nav&container_class=pagemenu&fallback_cb=stumblr_nav_fallback' ); else stumblr_nav_fallback(); } function stumblr_nav_fallback() { echo '
  • Home
  • '; wp_list_pages("depth=1&title_li="); } //setup footer widget area if (function_exists('register_sidebar')) { register_sidebar(array( 'name' => 'Side Widgets', 'id' => 'stumblr_widgets', 'description' => 'Side Widget Area', 'before_widget' => '
    ', 'after_widget' => '
    ', 'before_title' => '

    ', 'after_title' => '

    ' )); register_sidebar(array( 'name' => 'Footer Widgets', 'id' => 'stumblr_footer', 'description' => 'Footer Widget Area', 'before_widget' => '', 'before_title' => '

    ', 'after_title' => '

    ' )); } // video width add_filter('embed_defaults', 'custom_embed_defaults'); function custom_embed_defaults($embed_size) { if (is_single()) { // Conditionally set max height and width $embed_size['width'] = 740; $embed_size['height'] = 740; } else { // Default values $embed_size['width'] = 740; $embed_size['height'] = 740; } return $embed_size; // Return new size } // pagination function stumblr_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 "
    "; if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "«"; if($paged > 1 && $showitems < $pages) echo "‹"; for ($i=1; $i <= $pages; $i++) { if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems )) { echo ($paged == $i)? "".$i."":"".$i.""; } } if ($paged < $pages && $showitems < $pages) echo "›"; if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "»"; echo "
    \n"; } } // Stumblr theme options include 'options/admin-menu.php'; ?>