ID) . '">
'.$linktext.'';
}
add_filter('excerpt_more', 'business_new_excerpt_more');
function business_new_excerpt_length($length) {
global $options;
if ($options['bu_excerpt_length'] == '') {
$length = '55';
}
else {
$length = $options['bu_excerpt_length'];
}
return $length;
}
add_filter('excerpt_length', 'business_new_excerpt_length');
/* End excerpt functions. */
/* Add auto-feed links support. */
add_theme_support('automatic-feed-links');
/* Add post-thumb support. */
if ( function_exists( 'add_theme_support' ) ) {
global $options;
if($options['bu_featured_image_height'] == "") {
$featureheight = '100';
}
else {
$featureheight = $options['bu_featured_image_height'];
}
if ($options['bu_featured_image_width'] == "") {
$featurewidth = '100';
}
else {
$featurewidth = $options['bu_featured_image_width'];
}
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( $featureheight, $featurewidth, true );
}
// This theme allows users to set a custom background
add_custom_background();
// This theme styles the visual editor with editor-style.css to match the theme style.
add_editor_style();
/**
* Attach CSS3PIE behavior to elements
* Add elements here that need PIE applied
*/
function business_render_ie_pie() { ?>
";
echo $script;
}
add_action('wp_head', 'business_plusone');
// Load jQuery
if ( !is_admin() ) {
wp_deregister_script('jquery');
wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"), false);
wp_enqueue_script('jquery');
}
// Nivo Slider
function business_add_nivoslider(){
$path = get_template_directory_uri() ."/library/ns/";
$script = "
";
echo $script;
}
add_action('wp_head', 'business_add_nivoslider');
// Register superfish scripts
function business_add_scripts() {
if (!is_admin()) { // Add the scripts, but not to the wp-admin section.
// Adjust the below path to where scripts dir is, if you must.
$scriptdir = get_template_directory_uri() ."/library/sf/";
// Register the Superfish javascript file
wp_register_script( 'superfish', $scriptdir.'sf.js', false, '1.4.8');
wp_register_script( 'sf-menu', $scriptdir.'sf-menu.js');
// Now the superfish CSS
//load the scripts and style.
wp_enqueue_style('superfish-css');
wp_enqueue_script('superfish');
wp_enqueue_script('sf-menu');
} // end the !is_admin function
} //end add_our_scripts function
//Add our function to the wp_head. You can also use wp_print_scripts.
add_action( 'wp_head', 'business_add_scripts',0);
// Register menu names
function register_business_menus() {
register_nav_menus(
array( 'header-menu' => __( 'Header Menu' ))
);
}
add_action( 'init', 'register_business_menus' );
// Menu fallback
function menu_fallback() {
global $post; ?>