'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(); // This theme uses post thumbnails add_theme_support( 'post-thumbnails' ); // Add default posts and comments RSS feed links to head add_theme_support( 'automatic-feed-links' ); // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style(); // This theme uses post thumbnails add_theme_support( 'the_post-thumbnails' ); // Add default posts and comments RSS feed links to head add_theme_support( 'automatic-feed-links' ); // Make theme available for translation // Translations can be filed in the /languages/ directory load_theme_textdomain( 'black white poetry', TEMPLATEPATH . '/languages' ); $locale = get_locale(); $locale_file = TEMPLATEPATH . "/languages/$locale.php"; if ( is_readable( $locale_file ) ) require_once( $locale_file ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => __( 'Primary Navigation', 'black white poetry' ), ) ); // This theme allows users to set a custom background add_custom_background(); } 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++; } } 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($data->post_content,40)."

  • "; $i++; } } } 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); 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); for($i=0; $i 127 ? $j + 2 : $j + 1; if ($j > $length - 3) { return $wordscut." ..."; } } return join('', $info[0]); } function debut_options() { add_theme_page("User-Defined Picture or Advertisement", "User-Defined Picture or Advertisement", 'administrator', basename(__FILE__), 'debut_form'); add_action( 'admin_init', 'register_mysettings' ); } function register_mysettings() { register_setting( 'dubut-settings', 'image1'); register_setting( 'dubut-settings', 'link1'); register_setting( 'dubut-settings', 'image2'); register_setting( 'dubut-settings', 'link3'); } function debut_form(){ ?>

    User-Defined Picture or Advertisement


    User-Defined Picture Address 01: User-Defined Picture 01 Link To:
    User-Defined Picture Address 02: User-Defined Picture 02 Link To: