Created
July 17, 2012 19:29
-
-
Save robertcedwards/3131453 to your computer and use it in GitHub Desktop.
Functions for poolside
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Translations can be filed in the /languages/ directory | |
load_theme_textdomain( 'html5reset', TEMPLATEPATH . '/languages' ); | |
$locale = get_locale(); | |
$locale_file = TEMPLATEPATH . "/languages/$locale.php"; | |
if ( is_readable($locale_file) ) | |
require_once($locale_file); | |
// Add RSS links to <head> section | |
automatic_feed_links(); | |
function theme_scripts() { | |
wp_deregister_script('jquery'); | |
wp_register_script('jquery', "http" . ($_SERVER['SERVER_PORT'] == 443 ? "s" : "") . "://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js", false, null); | |
wp_enqueue_script('jquery'); | |
wp_enqueue_style('scss', ("/wp-content/themes/poolside/css/screen.css")); | |
wp_enqueue_style('fancystyle', ("/wp-content/themes/poolside/css/jquery.fancybox.css?v=2.0.4")); | |
//wp_enqueue_style('fancybox-buttons', ("/wp-content/themes/poolside/css/jquery.fancybox-buttons.css?v=2.0.4")); | |
//wp_enqueue_style('fancybox-thumbs', ("/wp-content/themes/poolside/css/jquery.fancybox-thumbs.css?v=2.0.4")); | |
// wp_enqueue_style('flex', ("/wp-content/themes/poolside/css/flex.css")); | |
//wp_enqueue_script('flexslide', ("/wp-content/themes/poolside/_/js/jquery.flex.js"), false); | |
wp_enqueue_script('isotope', ("/wp-content/themes/poolside/_/js/isotope.js"), false); | |
wp_enqueue_script('bbq', ("/wp-content/themes/poolside/_/js/jquery.ba-bbq.min.js"), false); | |
wp_enqueue_script('fancy', ("/wp-content/themes/poolside/_/js/jquery.fancybox.pack.js?v=2.0.4"), false); | |
//wp_enqueue_script('fbutton', ("/wp-content/themes/poolside/_/js/jquery.fancybox-buttons.js?v=2.0.4"), false); | |
// wp_enqueue_script('fthumb', ("/wp-content/themes/poolside/_/js/jquery.fancybox-thumbs.js?v=2.0.4"), false); | |
wp_enqueue_script('easing', ("/wp-content/themes/poolside/_/js/jquery.easing.1.3.js"), false); | |
// wp_enqueue_script('html5', ("http://html5shiv.googlecode.com/svn/trunk/html5.js"), false); | |
} | |
add_action('wp_enqueue_scripts','theme_scripts'); | |
// Clean up the <head> | |
function removeHeadLinks() { | |
remove_action('wp_head', 'rsd_link'); | |
remove_action('wp_head', 'wlwmanifest_link'); | |
} | |
add_action('init', 'removeHeadLinks'); | |
remove_action('wp_head', 'wp_generator'); | |
if (function_exists('register_sidebar')) { | |
register_sidebar(array( | |
'name' => 'Sidebar Widgets', | |
'id' => 'sidebar_widgets', | |
'description' => __( 'These are widgets for the sidebar.'), | |
'before_widget' => '<div id="%1$s" class="widget %2$s">', | |
'after_widget' => '</div>', | |
'before_title' => '<h2>', | |
'after_title' => '</h2>' | |
)); | |
register_sidebar(array( | |
'name' => 'Homepage Featured', | |
'description' => __( 'Homepage Large Image'), | |
'before_widget' => '<div id="featured">', | |
'after_widget' => '</div>', | |
)); | |
register_sidebar(array( | |
'name' => 'Shop Sidebar', | |
'id' => 'shop_widgets', | |
'description' => __( 'Alternate sidebar for shop'), | |
'before_widget' => '<div id="%1$s" class="widget %2$s">', | |
'after_widget' => '</div>', | |
'before_title' => '<h2>', | |
'after_title' => '</h2>' | |
)); | |
} | |
add_theme_support('post-thumbnails'); | |
set_post_thumbnail_size( 232, 232, false); // Normal post thumbnails | |
add_image_size('single-post-thumbnail', 232, 232, false); | |
// Read More Length | |
add_filter('excerpt_length', 'my_excerpt_length'); | |
function my_excerpt_length($length) { | |
return 25; | |
} | |
require_once('product.php'); | |
//Read More Character | |
add_filter('excerpt_more', 'new_excerpt_more'); | |
function new_excerpt_more($text){ | |
return ' <div class="more"></div> '; | |
} | |
//Bigger Thumbnails when necessary | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment