'sidebar', 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', )); register_sidebar(array( 'name' => 'footer-sidebar', 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', )); } if ( ! isset( $content_width ) ) $content_width = 588; function blackWhitePoetry_setup() { // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style(); // Add default posts and comments RSS feed links to head add_theme_support( 'automatic-feed-links' ); } add_action( 'after_setup_theme', 'BlackWhitePoetry_setup'); //slideshow function getFlashList($maxImg=5){ $flashArr =array(); $i=0; $lastposts = get_posts('numberposts=30'); //print_r($lastposts); foreach($lastposts as $temp){ if($i>$maxImg){ break; } $data = get_post($temp->ID); $content = $data->post_content; $pattern="//"; preg_match_all($pattern,$content,$match); if(empty($match[0][0])){ echo "
  • guid."\">".$data->post_title." ".$data->post_date."
  • "; }else{ echo "
  • guid."\">".$match[0][0]."".$data->post_title." ".$data->post_date."
  • "; } $i++; } } //3 popular posts function getImagesList($maxImg=3){ $flashArr =array(); $i=0; $lastposts = get_posts('numberposts=30&orderby=comment_count'); foreach($lastposts as $temp){ if($i>=$maxImg){ break; } $data = get_post($temp->ID); $content = $data->post_content; $pattern="//"; preg_match_all($pattern,$content,$match); if(empty($match[0][0])){ continue ; }else{ echo "
  • guid."\">".$data->post_title."

    ".cutstr(apply_filters('the_content', $data->post_content),40)."

  • "; $i++; } } } // thumbnail list function retImage($content){ $pattern="//"; preg_match_all($pattern,$content,$match); if(empty($match[0][0])){ echo ""; }else{ echo $match[0][0]; } } function cutstr($string, $length) { $string =strip_tags($string); $strcut= ''; if(strlen($string) > $length) { preg_match_all("/[\x01-\x7f]|[\xc2-\xdf][\x80-\xbf]|\xe0[\xa0-\xbf][\x80-\xbf]|[\xe1-\xef][\x80-\xbf][\x80-\xbf]|\xf0[\x90-\xbf][\x80-\xbf][\x80-\xbf]|[\xf1-\xf7][\x80-\xbf][\x80-\xbf][\x80-\xbf]/", $string, $info); $j = 0; for($i=0; $i 127 ? $j + 2 : $j + 1; if ($j > $length - 3) { return $strcut." ..."; } } return join('', $info[0]); } else { return $string; } } function debut_form(){ ?>