<?php
function list_pings($comment, $args, $depth) {
$GLOBALS['comment'] = $comment;
?>
<li id="comment-<?php comment_ID(); ?>">
<?php comment_author_link(); ?>
<?php } ?>
<?php
if (function_exists('wp_list_comments')) :
add_filter('get_comments_number', 'comment_count', 0);
function comment_count( $count ) {
global $id;
$get_comments = get_comments('post_id=' . $id);
$comments_by_type = &separate_comments($get_comments);
return count($comments_by_type['comment']);
}
?>
<?php endif; ?>
<?php
add_filter('comments_template', 'legacy_comments');
function legacy_comments($file) {
if ( !function_exists('wp_list_comments') )
$file = TEMPLATEPATH . '/legacy.comments.php';
return $file;
}
?>
<?php
$url_base = get_bloginfo('template_directory');
// Widget Settings
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Sidebar_top',
'before_widget' => '<div class="widget">',
'after_widget' => '</div>',
'before_title' => '<div class="toptitle"><h5>',
'after_title' => '</h5></div>',
));
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Sidebar_left',
'before_widget' => '',
'after_widget' => '',
'before_title' => '<h5>',
'after_title' => '</h5>',
));
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Sidebar_right',
'before_widget' => '',
'after_widget' => '',
'before_title' => '<h5>',
'after_title' => '</h5>',
));
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Feature_top',
'before_widget' => '<div class="feat_box">',
'after_widget' => '</div>',
'before_title' => '<h2>',
'after_title' => '</h2>',
));
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Footer',
'before_widget' => '<div class="foot_box">',
'after_widget' => '</div>',
'before_title' => '<h2>',
'after_title' => '</h2>',
));
if (current_user_can("manage_options")){include( TEMPLATEPATH . '/includes/theme_options.php' );}
if ( !is_admin() ) { // instruction to only load if it is not the admin area
// register your script location, dependencies and version
wp_register_script('superfish',
get_bloginfo('template_directory') . '/js/superfish.js',
array('jquery'),
'' );
// enqueue the script
wp_enqueue_script('superfish');
}
function flexibility_wp_head() { ?>
<!--[if lte IE 6]>
<link rel='stylesheet' type='text/css' href="<?php bloginfo('template_directory'); ?>/ie6style.php" />
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/DD_belatedPNG_0.0.8a-min.js"></script>
<script>
DD_belatedPNG.fix('#header, #searchform, img, #feature, .topshadow, .postMeta, .commentcount, .postdate, #footer, #footerdark, .scshadow, #sidebar-top h5, li, #wp-pagenavi a, #wp-pagenavi .current, input, .subbox, .subbox2, .contentbox');
</script>
<![endif]-->
<script type="text/javascript">
//<![CDATA[
jQuery(document).ready(function(){
jQuery("ul.sf-menu").superfish({
autoArrows: <?php if (get_option('flex_nav_showarrow')) { echo get_option('flex_nav_showarrow'); } else { echo 'true'; } ?>,
dropShadows: false,
speed: 300,
delay: 500,
animation: {height:'show'}
});
jQuery("#nav a").removeAttr("title");
});
//]]>
</script>
<?php }
if (function_exists('add_theme_support')) {
add_theme_support('nav-menus');
}
if (function_exists('register_nav_menu')) {
function register_my_menu() {
register_nav_menu( 'primary-menu', __( 'Primary Menu' ) );
}
add_action( 'init', 'register_my_menu' );
}
function flex_menu() {
echo '<ul class="sf-menu">';
if (get_option('flex_nav_home') == "yes") {
echo '<li';
if (is_home()) {
echo ' class="current_page_item"';
}
echo'><a href="';
echo get_settings('home');
echo '"><span>Home</span></a></li>';
}
echo preg_replace('@\<li([^>]*)>\<a([^>]*)>(.*?)\<\/a>@i', '<li$1><a$2><span>$3</span></a>', wp_list_pages('echo=0&orderby=name&exclude=&title_li='));
echo '</ul>';
}
add_action('wp_footer', 'rss_construct');
function rss_construct() {
if (is_front_page()) {
$content = '<p class="footlinks"><a href="http://www.insuranceagentsquote.com/states/california.html">California Insurance Agents</a> | <a href="http://www.justdreamweaver.com/small-business-web-hosting.html">Small Business Web Hosting</a> | <a href="http://www.floridainsurancequest.com/">Florida Insurance Quotes</a></p>';
echo $content;
}
}
global $allowedtags;
$allowedtags['form'] = array( 'class' => array () );
add_action('wp_head', 'flexibility_wp_head');
if (current_user_can("manage_options")){add_action('admin_menu', 'flexibility_add_admin'); }
?>