__('Reply ↓', 'BubbleDream'), 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?>
__('Primary Navigation', 'BubbleDream'),)); //widget function,from twentyten theme function BubbleDream_widgets_init() { // Area 1, located at the top of the sidebar. register_sidebar(array('name' => __('Primary Widget Area', 'BubbleDream'), 'id' => 'primary-widget-area', 'description' => __('The primary widget area', 'BubbleDream'), 'before_widget' => '
', 'before_title' => '',)); register_sidebar(array('name' => __('Footer Widget Area', 'BubbleDream'), 'id' => 'footer-widget-area', 'description' => __('The footer widget area', 'BubbleDream'), 'before_widget' => '', 'before_title' => '',)); } add_action('widgets_init', 'BubbleDream_widgets_init'); /** Register sidebars by running BubbleDream_widgets_init() on the widgets_init hook. */ /**some function modified */ if (!is_admin()) { // add google analytics to footer function BubbleDream_init_method() { wp_register_script('BubbleDream', get_template_directory_uri() . '/js/BubbleDream.js', array('jquery'), '0.1', true); wp_enqueue_script('BubbleDream'); wp_deregister_script('jquery'); wp_register_script('jquery', get_template_directory_uri() . 'http://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js', false, '1.7.1', true); wp_enqueue_script('jquery'); } add_action('init', 'BubbleDream_init_method'); } function BubbleDream_browser_body_class($classes) { global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone; if ($is_lynx) $classes[] = 'lynx'; elseif ($is_gecko) $classes[] = 'gecko'; elseif ($is_opera) $classes[] = 'opera'; elseif ($is_NS4) $classes[] = 'ns4'; elseif ($is_safari) $classes[] = 'safari'; elseif ($is_chrome) $classes[] = 'chrome'; elseif ($is_IE) { $classes[] = 'ie'; //if the browser is IE6 if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6') !== false) { $classes[] = 'ie6'; //add 'ie6' class to the body class array } else if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7') !== false) { $classes[] = 'ie7'; //add 'ie6' class to the body class array } else if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 8') !== false) { $classes[] = 'ie8'; //add 'ie6' class to the body class array } else if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 9') !== false) { $classes[] = 'ie9'; //add 'ie6' class to the body class array } } else $classes[] = 'unknown'; if ($is_iphone) $classes[] = 'iphone'; return $classes; } add_filter('body_class', 'BubbleDream_browser_body_class'); function BubbleDream_post_expander_show_post() { if (have_posts()) { while (have_posts()) { the_post(); the_content(); } } die(); } function BubbleDream_post_expander_activate() { if (isset($_POST["post_expander"])) { add_action('wp', 'BubbleDream_post_expander_show_post'); } } add_action('init', 'BubbleDream_post_expander_activate'); class zxdRoboCheck { function zxd_robokiller_fields($fields) { $rnum1 = rand(1, 10); $rnum2 = rand(2, 8); $rnum = $rnum1 + $rnum2; $fields['robo'] = '*
'; return $fields; } function roboCheck($comment) { $user_id = get_current_user_id(); if ($user_id != 0) return ($comment); if (empty($_POST['robo']) || trim($_POST['robo']) == '') { wp_die(__('Error: you are not robot,are you?do the math,fill the blank ')); } $robo_num1 = (int)$_POST['robo']; $robo_num2 = (int)$_POST['rnum']; if ($robo_num2 == $robo_num1) { return ($comment); } else { wp_die(__('Error: you are not robot,are you?')); } } } if (class_exists("zxdRoboCheck")) { $aRoboCheck = new zxdRoboCheck(); add_action('comment_form_default_fields', array(&$aRoboCheck, 'zxd_robokiller_fields'), 1); add_filter('preprocess_comment', array($aRoboCheck, 'roboCheck'), 1); } function my_remove_recent_comments_style() { global $wp_widget_factory; remove_action('wp_head', array($wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style')); } if (!function_exists('BubbleDream_comment')): function BubbleDream_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; switch ($comment->comment_type): case 'pingback': case 'trackback': ?>', ''); ?>