__( 'Primary Menu', 'toolbox' ), ) ); // Set the excerpt length here add_filter('excerpt_length', 'toolbox_excerpt_length'); function toolbox_excerpt_length($length) { return 50; } // Set the content width based on the theme's design and stylesheet. if ( ! isset( $content_width ) ) $content_width = 640; /* pixels */ // excerpt continue reading... function excerpt_toolbox($text) { return str_replace('[...]', ' Read more...', $text); } add_filter('the_excerpt', 'excerpt_toolbox'); // This sets the dimensions for the thumbnails displayed on the homepage add_theme_support( 'post-thumbnails' ); add_image_size('excerpt-thumbnail', 140, 140, true); // Add default posts and comments RSS feed links to head add_theme_support( 'automatic-feed-links' ); // Add support for the Aside and Gallery Post Formats add_theme_support( 'post-formats', array( 'aside', 'gallery' ) ); // Register widgetized area and update sidebar with default widgets function toolbox_widgets_init() { register_sidebar( array ( 'name' => __( 'Sidebar 1', 'toolbox' ), 'id' => 'sidebar-1', 'before_widget' => '", 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array ( 'name' => __( 'Sidebar 2', 'toolbox' ), 'id' => 'sidebar-2', 'description' => __( 'An optional second sidebar area', 'toolbox' ), 'before_widget' => '", 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'init', 'toolbox_widgets_init' ); add_theme_support( 'automatic-feed-links' ); $themename = "Basic Press"; $shortname = "toolbox"; $version = "1.0"; $options = array ( 'header' => array ( 'name' => __('Main Options', 'toolbox'), 'type' => 'section' ), 'show_menu' => array( 'name' => __('Show Menu under header?', 'toolbox'), 'desc' => '', 'type' => 'checkbox', 'default' => 'off', 'category' => 'posts' ), 'show_tag' => array( 'name' => __('Show post tags?', 'toolbox'), 'desc' => '', 'type' => 'checkbox', 'default' => 'off', 'category' => 'posts' ), 'show_cat' => array( 'name' => __('Show Categories?', 'toolbox'), 'desc' => '', 'type' => 'checkbox', 'default' => 'off', 'category' => 'posts' ), 'show_thumb' => array( 'name' => __('Show Post Thumbnails?', 'toolbox'), 'desc' => '', 'type' => 'checkbox', 'default' => 'on', 'category' => 'posts' ), 'archive_posts' => array ( 'name' => __('Full post or excerpt on home page?', 'toolbox'), 'desc' => __('You can adjust the excerpt length in the functions file.', 'toolbox'), 'type' => 'select', 'options' => array ( array('full', __('Full post', 'toolbox')), array('excerpt', __('Excerpts', 'toolbox')) ), 'default' => 'excerpt', 'category' => 'posts' ), array ( 'type' => 'section_close' ), ); function toolbox_add_admin() { global $themename, $shortname, $options; if( $_GET['page'] == basename(__FILE__) ) { if(__('Save changes', 'toolbox') == $_REQUEST['action']) { foreach($options as $key => $option) { $id = $shortname.'_'.$key; if($option['type'] == 'checkbox') $value = $_REQUEST[$id]?'on':'off'; else $value = isset($_REQUEST[$id])?stripslashes($_REQUEST[$id]):$option['default']; update_option($id, $value); } header("Location: themes.php?page=functions.php&saved=true"); die; } else if(__('Reset to defaults', 'toolbox') == $_REQUEST['action']) { foreach($options as $key => $value) delete_option($shortname.'_'.$key); header("Location: themes.php?page=functions.php&reset=true"); die; } } add_theme_page($themename.' '.__('Settings', 'toolbox'), $themename.' '.__('Settings', 'toolbox'), 'edit_themes', basename(__FILE__), 'toolbox_admin'); } function toolbox_admin() { global $themename, $shortname, $version, $options; $options = $options; if ( $_REQUEST['saved'] ) echo '

'.__('Settings saved', 'toolbox').'

'; if ( $_REQUEST['reset'] ) echo '

'.__('Settings reset', 'toolbox').'

'; ?>

WordPress theme . theme page', 'toolbox'), 'http://zeaks.org/basic-press-theme/'); ?>. readme', 'toolbox'), get_template_directory_uri().'/readme.txt'); ?>.

This theme was created with a Toolbox, theme settings from F2 theme. Design by Zeaks.

$option) { $id = $shortname.'_'.$key; $value = get_option($id, $option['default']); switch ($option['type'] ) { case "section": { ?>

> /> px"; ?>
"; echo "".$option['desc'].""; } ?> > /> ".$option['desc'].""; ?> > ".$option['desc'].""; ?> > ".$option['desc'].""; ?>
$option) $$key = get_option($shortname.'_'.$key, $option['default']); if($style) { echo "\n"; } echo ''."\n"; } add_action('wp_head', 'toolbox_head'); function toolbox_admin_head() { if( $_GET['page'] == basename(__FILE__) ) { $template_url = get_bloginfo('template_url'); ?>