cat_ID] = $category_list->cat_name; } array_unshift($wp_cats, __('Choose a category', 'bricenergy')); $options = array ( array( "name" => $themename. __('Options', 'bricenergy'), "type" => "title"), array( "name" => __('General', 'bricenergy'), "type" => "section"), array( "type" => "open"), array( "name" => __('Color Scheme', 'bricenergy'), "desc" => __('Select the color scheme for Bric Energy.', 'bricenergy'), "id" => $shortname."_color_scheme", "type" => "select", "options" => array("red", "blue", "green", "yellow"), "std" => "red"), array( "name" => __('Custom CSS', 'bricenergy'), "desc" => __('Want to add any custom CSS code? Put in here, and the rest is taken care of. This overrides any other stylesheets. eg: a.button{color:green}', 'bricenergy'), "id" => $shortname."_custom_css", "type" => "textarea", "std" => ""), array( "type" => "close"), array( "name" => __('Header', 'bricenergy'), "type" => "section"), array( "type" => "open"), array( "name" => __('Logo URL', 'bricenergy'), "desc" => __('Enter the link to your logo image. Best results with: 200×90 pixel.', 'bricenergy'), "id" => $shortname."_logo", "type" => "text", "std" => $themedir."/images/logo.png"), array( "name" => __('Custom Favicon', 'bricenergy'), "desc" => __('A favicon is a 16x16 pixel icon that represents your site; paste the URL to a .ico image that you want to use as the image', 'bricenergy'), "id" => $shortname."_favicon", "type" => "text", "std" => home_url() ."/favicon.ico"), array( "name" => __('Header Leaderboard', 'bricenergy'), "desc" => __('Want to add a 728×90px banner in the header? Then put your code in here.

You can insert Adsense code or HTML, for example:

<a href=\"[Website-URL]\" target=\"_blank\"><img src=\"[Banner-URL]\" height=\"60px\" width=\"468px\" title=\"[Title]\"></a>', 'bricenergy'), "id" => $shortname."_header_ad", "type" => "textarea", "std" => ""), array( "name" => __('Facebook Button', 'bricenergy'), "desc" => __('Do you have a page or group on Facebook? Then insert the full URL here. This will create a small Facebook button in the main navigation.', 'bricenergy'), "id" => $shortname."_fb_button", "type" => "text", "std" => ""), array( "name" => __('Twitter Button', 'bricenergy'), "desc" => __('Are you tweeting? Then insert your nickname here. This will create a small Twitter button in the main navigation.', 'bricenergy'), "id" => $shortname."_tw_button", "type" => "text", "std" => ""), array( "type" => "close"), array( "name" => __('Homepage', 'bricenergy'), "type" => "section"), array( "type" => "open"), array( "name" => __('Homepage featured category', 'bricenergy'), "desc" => __('Choose a category from which featured posts are drawn', 'bricenergy'), "id" => $shortname."_feat_cat", "type" => "select", "options" => $wp_cats, "std" => __('Choose a category', 'bricenergy')), array( "name" => __('Featured Button Text', 'bricenergy'), "desc" => __('Text in the featured button. Leave this blank if you don\'t wanna display it.', 'bricenergy'), "id" => $shortname."_featured_text", "type" => "text", "std" => "Featured"), array( "type" => "close"), array( "name" => __('Footer', 'bricenergy'), "type" => "section"), array( "type" => "open"), array( "name" => __('Footer Logo URL', 'bricenergy'), "desc" => __('Enter the link to your footer logo image. It will be centered. Leave it blank if you don\'t wanna use a footer logo. Best results with: 300×100 pixel and transparency.', 'bricenergy'), "id" => $shortname."_ft_logo", "type" => "text", "std" => $themedir."/images/logo-footer.png"), array( "name" => __('Google Analytics Code', 'bricenergy'), "desc" => __('You can paste your Google Analytics or other tracking code in this box. This will be automatically added to the footer.', 'bricenergy'), "id" => $shortname."_ga_code", "type" => "textarea", "std" => ""), array( "type" => "close") ); function mytheme_add_admin() { global $themename, $shortname, $options; if ( $_GET['page'] == basename(__FILE__) ) { if ( 'save' == $_REQUEST['action'] ) { foreach ($options as $value) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } foreach ($options as $value) { if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } } header("Location: admin.php?page=functions.php&saved=true"); die; } else if( 'reset' == $_REQUEST['action'] ) { foreach ($options as $value) { delete_option( $value['id'] ); } header("Location: admin.php?page=functions.php&reset=true"); die; } } add_theme_page($themename, $themename, 'administrator', basename(__FILE__), 'mytheme_admin'); } function mytheme_add_init() { $file_dir=get_bloginfo('template_directory'); wp_enqueue_style("functions", $file_dir."/functions/functions.css", false, "1.0", "all"); wp_enqueue_script("rm_script", $file_dir."/functions/rm_script.js", false, "1.0"); } function mytheme_admin() { global $themename, $shortname, $options; $i=0; if ( $_REQUEST['saved'] ) echo '

'.$themename.' ' . __('settings saved', 'bricenergy') . '.

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

'.$themename.' ' . __('settings reset', 'bricenergy') . '.

'; ?>


" />
/>

Icons: WooFunction
\n"; if(!empty($bgimage)) { $background_styles = 'background-image: url(\'' . get_theme_mod('background_image', '') . '\');' . ' background-repeat: ' . get_theme_mod('background_repeat', 'repeat') . ';' . ' background-position: top ' . get_theme_mod('background_position_x', 'left') . ';' . 'background-attachment: '. get_theme_mod('background_attachment', 'scroll'); echo "body { ".$background_styles."); } \n"; } if(!empty($bgcolor)) { echo "body { background-color: #".$bgcolor."; }; \n"; } if(empty($bgimage) && empty($bgcolor)) { echo "body { background: url(" .get_template_directory_uri(). "/images/background.jpg) fixed no-repeat top center transparent; }\n"; } echo ""; } } /* Sidebars */ if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => __( 'Sidebar', 'bricenergy' ), 'id' => 'full-sidebar', 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', )); // News-Ticker Sidebar register_sidebar( array( 'name' => __( 'Text Ticker', 'bricenergy' ), 'id' => 'newsticker-sidebar', 'description' => __( 'DO ONLY PUT THE TEXT WIDGET IN HERE! This will create a nice ticker above the main navigation.', 'bricenergy' ), 'before_widget' => '', 'after_widget' => '', 'before_title' => '
    ', 'after_title' => '
    ', ) ); // Footer 1 register_sidebar( array( 'name' => __( 'Footer 1', 'bricenergy' ), 'id' => 'footer-1', 'description' => __( 'Left Footer Widgets', 'bricenergy' ), 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); // Footer 2 register_sidebar( array( 'name' => __( 'Footer 2', 'bricenergy' ), 'id' => 'footer-2', 'description' => __( 'Middle Footer Widgets', 'bricenergy' ), 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); // Footer 3 register_sidebar( array( 'name' => __( 'Footer 3', 'bricenergy' ), 'id' => 'footer-3', 'description' => __( 'Right Footer Widgets', 'bricenergy' ), 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); // Featured Post Image if (function_exists('add_theme_support')) { add_theme_support('post-thumbnails'); set_post_thumbnail_size(250, 250); add_image_size('620', 620, 620); } function new_excerpt_more($excerpt) { return str_replace('[...]', '...', $excerpt); } add_filter('wp_trim_excerpt', 'new_excerpt_more'); if ( function_exists( 'register_nav_menus' ) ) { register_nav_menus( array( 'menu_1' => __('Header Menu', 'bricenergy'), 'menu_2' => __('Main Menu', 'bricenergy'), ) ); } ?>