'#'), $atts)); return '' . do_shortcode($content) . ''; } add_shortcode('button_black', 'button_black_shortcode'); function button_blue_shortcode( $atts, $content = null ) { extract(shortcode_atts(array('link' => '#'), $atts)); return '' . do_shortcode($content) . ''; } add_shortcode('button_blue', 'button_blue_shortcode'); function button_pink_shortcode( $atts, $content = null ) { extract(shortcode_atts(array('link' => '#'), $atts)); return '' . do_shortcode($content) . ''; } add_shortcode('button_pink', 'button_pink_shortcode'); function button_green_shortcode( $atts, $content = null ) { extract(shortcode_atts(array('link' => '#'), $atts)); return '' . do_shortcode($content) . ''; } add_shortcode('button_green', 'button_green_shortcode'); function button_orange_shortcode( $atts, $content = null ) { extract(shortcode_atts(array('link' => '#'), $atts)); return '' . do_shortcode($content) . ''; } add_shortcode('button_orange', 'button_orange_shortcode'); function button_purple_shortcode( $atts, $content = null ) { extract(shortcode_atts(array('link' => '#'), $atts)); return '' . do_shortcode($content) . ''; } add_shortcode('button_purple', 'button_purple_shortcode'); /* Shortcodes - one_half ********************************************/ function one_half_shortcode( $atts, $content = null ) { return '
' . $content . '
'; } function one_half_last_shortcode( $atts, $content = null ) { return '
' . $content . '
'; } add_shortcode('one_half', 'one_half_shortcode'); add_shortcode('one_half_last', 'one_half_last_shortcode'); /* Shortcodes - one_third ********************************************/ function one_third_shortcode( $atts, $content = null ) { return '
' . $content . '
'; } function one_third_last_shortcode( $atts, $content = null ) { return '
' . $content . '
'; } add_shortcode('one_third', 'one_third_shortcode'); add_shortcode('one_third_last', 'one_third_last_shortcode'); /* Shortcodes - one_fourth ********************************************/ function one_fourth_shortcode( $atts, $content = null ) { return '
' . $content . '
'; } function one_fourth_last_shortcode( $atts, $content = null ) { return '
' . $content . '
'; } add_shortcode('one_fourth', 'one_fourth_shortcode'); add_shortcode('one_fourth_last', 'one_fourth_last_shortcode'); /* Shortcodes - two_third ********************************************/ function two_third_shortcode( $atts, $content = null ) { return '
' . $content . '
'; } function two_third_last_shortcode( $atts, $content = null ) { return '
' . $content . '
'; } add_shortcode('two_third', 'two_third_shortcode'); add_shortcode('two_third_last', 'two_third_last_shortcode'); /* Shortcodes - three_fourth ********************************************/ function three_fourth_shortcode( $atts, $content = null ) { return '
' . $content . '
'; } function three_fourth_last_shortcode( $atts, $content = null ) { return '
' . $content . '
'; } add_shortcode('three_fourth', 'three_fourth_shortcode'); add_shortcode('three_fourth_last', 'three_fourth_last_shortcode'); /* Shortcodes - dropcap ********************************************/ function dropcap_shortcode( $atts, $content = null ) { return '' . $content . ''; } add_shortcode('dropcap', 'dropcap_shortcode'); /* Shortcodes - box styles ********************************************/ function box_yellow_shortcode( $atts, $content = null ) { return '
' . $content . '
'; } function box_green_shortcode( $atts, $content = null ) { return '
' . $content . '
'; } function box_blue_shortcode( $atts, $content = null ) { return '
' . $content . '
'; } add_shortcode('box_yellow', 'box_yellow_shortcode'); add_shortcode('box_green', 'box_green_shortcode'); add_shortcode('box_blue', 'box_blue_shortcode'); /* Shortcodes - highlight ********************************************/ function highlight_shortcode( $atts, $content = null ) { return '' . $content . ''; } add_shortcode('highlight', 'highlight_shortcode'); /* Shortcodes - divider ********************************************/ function divider_shortcode( $atts, $content = null ) { return '
' . $content . '
'; } add_shortcode('divider', 'divider_shortcode'); function divider_no_border_shortcode( $atts, $content = null ) { return '
' . $content . '
'; } add_shortcode('divider_no_border', 'divider_no_border_shortcode'); /* Shortcodes - multi column ********************************************/ function multi_col_shortcode( $atts, $content = null ) { return '
' . $content . '
'; } add_shortcode('multi_col', 'multi_col_shortcode'); /* Shortcodes - Pullquote ********************************************/ function pullquote_left( $atts, $content = null ) { return '
' . $content . '
'; } add_shortcode('pullquote_left', 'pullquote_left'); function pullquote_right( $atts, $content = null ) { return '
' . $content . '
'; } add_shortcode('pullquote_right', 'pullquote_right'); /* Shortcodes - checklist ********************************************/ function checklist($atts, $content = null) { return '
'.$content.'
'; } add_shortcode('checklist', 'checklist'); /* Enable support for automatic-feed-links ********************************************/ add_theme_support('automatic-feed-links'); /* Enable support for post-thumbnails ********************************************/ // If we want to ensure that we only call this function if // the user is working with WP 2.9 or higher, // let's instead make sure that the function exists first if ( function_exists( 'add_theme_support' ) ){ add_theme_support( 'post-thumbnails', array( 'post' ) ); // Add it for posts set_post_thumbnail_size( 200, 200, true ); // Normal post thumbnails, hard crop mode add_image_size( 'post-image', 600, 200, true ); // Post thumbnails, hard crop mode add_image_size( 'slider-image', 920, 300, true ); // Post thumbnails for slider, hard crop mode } /* Breadcrumb ********************************************/ function the_breadcrumb() { if (!is_home()) { echo ''; echo ('Home'); echo " » "; if (is_single()) { the_title(''); if (is_single()) { echo ""; } } elseif (is_page()) { echo the_title(); } } } /* WordPress 3.0 Menu Editor ********************************************/ // add menu support and fallback menu if menu doesn't exist add_action('init', 'wpj_register_menu'); function wpj_register_menu() { if (function_exists('register_nav_menu')) { register_nav_menu( 'wpj-main-menu', __( 'Main Menu', 'Brightpage' ) ); } } function wpj_default_menu() { echo ''; } /* Excerpt ********************************************/ /* Make the "read more" link to the post */ function new_excerpt_more($more) { global $post; return '
' . 'Read more...' . ''; } add_filter('excerpt_more', 'new_excerpt_more'); /* Set the excerpt length */ function new_excerpt_length($length) { return 60; } add_filter('excerpt_length', 'new_excerpt_length'); /* Widgets ********************************************/ if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'Sidebar Top', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'Sidebar Left', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'Sidebar Right', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'Bottom Menu Left', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'Bottom Menu Center', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'Bottom Menu Right', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); /* Theme Options ********************************************/ $themename = "Brightpage"; $shortname = "bright"; $categories = get_categories('hide_empty=0&orderby=name'); $wp_cats = array(); foreach ($categories as $category_list ) { $wp_cats[$category_list->cat_ID] = $category_list->cat_name; } array_unshift($wp_cats, "Choose a category"); $options = array ( array( "name" => $themename." Options", "type" => "title"), array( "name" => "General", "type" => "section"), array( "type" => "open"), array( "name" => "Background Color", "desc" => "Select the background color for the theme", "id" => $shortname."_background_color", "type" => "select", "options" => array("light-gray", "wood-pattern-vertical"), "std" => "light-gray"), array( "name" => "Slider Color Scheme", "desc" => "Select the slider color scheme", "id" => $shortname."_slider_color", "type" => "select", "options" => array("gray", "dark-gray"), "std" => "gray"), array( "name" => "Logo URL", "desc" => "Enter the link to your logo image", "id" => $shortname."_logo", "type" => "text", "std" => ""), array( "name" => "Custom CSS", "desc" => "Want to add any custom CSS code? Put in here, and the rest is taken care of. This overrides any other stylesheets. eg: body { color: blue; }", "id" => $shortname."_custom_css", "type" => "textarea", "std" => ""), array( "name" => "Feedburner URL", "desc" => "Feedburner is a Google service that takes care of your RSS feed. Paste your Feedburner URL here to let readers see it in your website", "id" => $shortname."_feedburner", "type" => "text", "std" => get_bloginfo('rss2_url')), array( "name" => "Google Analytics Code", "desc" => "Paste your Google Analytics or other tracking code in this box. This will be automatically added to the header.", "id" => $shortname."_ga_code", "type" => "textarea", "std" => ""), array( "type" => "close"), array( "name" => "Home Page - Featured Content Slider", "type" => "section"), array( "type" => "open"), array( "name" => "Activate Featured Content Slider", "desc" => "Check the box to featured content slider in homepage.", "id" => $shortname."_activate_slider", "type" => "checkbox", "std" => "true"), array( "name" => "Category for Featured Content Slider in home page", "desc" => "Choose a category from which featured posts are drawn.", "id" => $shortname."_feat_cat", "type" => "select", "options" => $wp_cats, "std" => "Choose a category"), array( "name" => "Amount of Featured Content Slider posts", "desc" => "Choose the amount of posts of featured content slider.", "id" => $shortname."_feat_num", "type" => "text", "std" => "5"), array( "type" => "close"), array( "name" => "Home Page - Intro", "type" => "section"), array( "type" => "open"), array( "name" => "Intro text", "desc" => "Enter text used in the intro. It can be HTML", "id" => $shortname."_intro_text", "type" => "textarea", "std" => ""), array( "type" => "close"), array( "name" => "Bottom Menu", "type" => "section"), array( "type" => "open"), array( "name" => "Activate 3 Column Bottom Menu", "desc" => "Check the box to activate 3 column bottom menu.", "id" => $shortname."_activate_bottom_menu", "type" => "checkbox", "std" => "true"), array( "type" => "close"), array( "name" => "Footer", "type" => "section"), array( "type" => "open"), array( "name" => "Footer text", "desc" => "Enter text used in the footer. It can be HTML", "id" => $shortname."_footer_text", "type" => "textarea", "std" => ""), array( "type" => "close"), array( "name" => "Footer - Networks", "type" => "section"), array( "type" => "open"), array( "name" => "Activate Footer Networks Menu", "desc" => "Check the box to activate Footer Networks Menu.", "id" => $shortname."_activate_networks", "type" => "checkbox", "std" => "true"), array( "name" => "Facebook URL", "desc" => "Paste your Facebook URL here.", "id" => $shortname."_facebook", "type" => "text", "std" => ""), array( "name" => "Flickr URL", "desc" => "Paste your Flickr URL here.", "id" => $shortname."_flickr", "type" => "text", "std" => ""), array( "name" => "LinkedIn URL", "desc" => "Paste your LinkedIn URL here.", "id" => $shortname."_linkedin", "type" => "text", "std" => ""), array( "name" => "LastFM URL", "desc" => "Paste your LastFM URL here.", "id" => $shortname."_lastfm", "type" => "text", "std" => ""), array( "name" => "My Space URL", "desc" => "Paste your My Space URL here.", "id" => $shortname."_myspace", "type" => "text", "std" => ""), array( "name" => "Twitter URL", "desc" => "Paste your Twitter URL here.", "id" => $shortname."_twitter", "type" => "text", "std" => ""), array( "name" => "Delicious URL", "desc" => "Paste your Delicious URL here.", "id" => $shortname."_delicious", "type" => "text", "std" => ""), array( "name" => "RSS URL", "desc" => "Paste your RSS URL here.", "id" => $shortname."_rss", "type" => "text", "std" => ""), array( "name" => "StumbleUpon URL", "desc" => "Paste your StumbleUpon URL here.", "id" => $shortname."_stumbleupon", "type" => "text", "std" => ""), array( "name" => "Technorati URL", "desc" => "Paste your Technorati URL here.", "id" => $shortname."_technorati", "type" => "text", "std" => ""), array( "type" => "close") ); function mytheme_add_admin() { global $themename, $shortname, $options, $option_values; if ( isset($_GET['page']) && $_GET['page'] == basename(__FILE__) ) { if ( isset($_REQUEST['action']) && 'save' == $_REQUEST['action'] ) { foreach ($options as $value) { if (isset($_REQUEST[ $value['id'] ])) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } } foreach ($options as $value) { if ( isset( $value['id'] ) ) { if (get_option( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_option( $value['id'] ); } } } header("Location: admin.php?page=functions.php&saved=true"); die; } else if( isset($_REQUEST['action']) && '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_template_directory_uri(); 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 (isset($_REQUEST['saved']) && !empty($_REQUEST['saved'])) echo '

'.$themename.' settings saved.

'; if (isset($_REQUEST['reset']) && !empty($_REQUEST['reset'])) echo '

'.$themename.' settings reset.

'; ?>

Settings


To easily use the theme, use the menu below.

" />
/>