__( "Post Default", TCB_TEXT_DOMAIN ),
"desc" => __( "Display either the full post content or the excerpt content on the front page.", TCB_TEXT_DOMAIN ),
"id" => TCB_SHORT_NAME."_post_default",
"value" => "radio",
"options" => array("content" => "post_content()", "excerpt" => "post_excerpt()"),
"std" => "excerpt" ),
array (
"name" => __( "Post Meta", TCB_TEXT_DOMAIN ),
"desc" => __( "Displays the post meta data. Name, Date and Post Count.", TCB_TEXT_DOMAIN ),
"id" => TCB_SHORT_NAME."_post_meta",
"value" => "radio",
"options" => array("yes" => "Yes", "no" => "No"),
"std" => "no" ),
array (
"name" => __( "Post Meta Image", TCB_TEXT_DOMAIN ),
"desc" => __( 'Displays a post meta image. (to add the image use the "Set featured image" on the post.', TCB_TEXT_DOMAIN ),
"id" => TCB_SHORT_NAME."_post_meta_image",
"value" => "radio",
"options" => array("yes" => "Yes", "no" => "No"),
"std" => "no" ),
array (
"name" => __( "Header Image Height (pixels)", TCB_TEXT_DOMAIN ),
"desc" => __( "Change the default hight for the header image
*NOTE - If the value is changed after the image is set the image will be resized and NOT Cropped. ", TCB_TEXT_DOMAIN ),
"id" => TCB_SHORT_NAME."_header_image_height",
"value" => "text",
"std" => TCB_CUSTOM_HEADER_DEFAULT_HEIGHT ,
"sanitize_type" => "int" ),
array (
"name" => __( "Turn on font Options", TCB_TEXT_DOMAIN ),
"desc" => __( "ONLY Turns the font options BELOW on or off", TCB_TEXT_DOMAIN ),
"id" => TCB_SHORT_NAME."_turn_on_off",
"value" => "radio",
"options" => array("on" => "On", "off" => "Off"),
"std" => "off" ),
array (
"name" => __( "Header Text Alignment", TCB_TEXT_DOMAIN ),
"desc" => __( "Align the title and Tag line left or right (it is recomended that if you use the custom header function to turn of the text under that option due to formating restrictions, unless you fix that through the css.)", TCB_TEXT_DOMAIN ),
"id" => TCB_SHORT_NAME."_alt_title_align",
"selector" => array("#header .heading", "#header .heading"),
"property" => array("float", "text-align"),
"value" => "radio",
"options" => array ( "left" => "Align Left", "right" => "Align Right"),
"std" => "right" ),
array (
"name" => __( "Body Text Size", TCB_TEXT_DOMAIN ),
"desc" => __( 'Set the font size for the body text (Default = 16px. THIS VALUE WILL AFFECT ALL FONT SIZES.)', TCB_TEXT_DOMAIN ),
"id" => TCB_SHORT_NAME."_alt_body_text_size",
"selector" => "p",
"property" => "font-size",
"value" => "text",
"std" => "16px" ,
"sanitize_type" => "fontsize" ),
array (
"name" => __( "Text Color (hex value)", TCB_TEXT_DOMAIN ),
"desc" => __( "Select a colour for p, span, div.", TCB_TEXT_DOMAIN ),
"id" => TCB_SHORT_NAME."_alt_text_colour",
"selector" => "p",
"property" => "color",
"value" => "text",
"std" => "#525244" ,
"sanitize_type" => "hexcolor"),
array (
"name" => __( "Heading Color (hex value)", TCB_TEXT_DOMAIN ),
"desc" => __( "Select colour for all H tags.", TCB_TEXT_DOMAIN ),
"id" => TCB_SHORT_NAME."_alt_header_colour",
"selector" => array ( "h1", "h2", "h3", "h4", "h5", "h6" ),
"property" => array ( "color", "color", "color", "color", "color", "color" ),
"value" => "text",
"std" => "#cccc9c" ,
"sanitize_type" => "hexcolor" ),
array (
"name" => __( "Link Color (hex value)", TCB_TEXT_DOMAIN ),
"desc" => __( "Select colour for link text.", TCB_TEXT_DOMAIN ),
"id" => TCB_SHORT_NAME."_alt_link_colour",
"selector" => array ( "a", ".tagcloud a", "#wp-calendar tr td a:hover" ),
"property" => array ( "color", "color", "background-color" ),
"value" => "text",
"std" => "#86865f" ,
"sanitize_type" => "hexcolor" ),
);
// Get theme options from db
global $theme_options_db;
$theme_options_db = get_theme_mod( TCB_SHORT_NAME, false );
// Found nothing in database, set defaults
if ($theme_options_db == false) {
foreach ($theme_options AS $value) {
if (array_key_exists("id", $value)) {
$theme_options_db[ $value['id'] ] = $value['std'];
}
}
}
// Set wp_nav_menu
register_nav_menus( array(
'primary' => __( 'Primary Navigation', TCB_TEXT_DOMAIN ),
) );
// Set the default content width (.content_area) if one is not set.
if ( ! isset( $content_width ) ) $content_width = 660;
// This feature enables post and comment RSS feed links to head
add_theme_support('automatic-feed-links');
// Add Post Format Support
add_theme_support( 'post-formats', array( 'aside', 'status' ) );
// Add custom background support
add_custom_background();
// Add editor style support
add_editor_style();
// Set post thumbnail
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( TCB_POST_THUMBNAIL_HEIGHT, TCB_POST_THUMBNAIL_WIDTH, true );
// Add Custom Header Support
if ( ! defined( 'HEADER_TEXTCOLOR' ) )
define( 'HEADER_TEXTCOLOR', '' );
$custom_header_image_height = commonblog_get_option(TCB_SHORT_NAME . "_header_image_height", TCB_CUSTOM_HEADER_DEFAULT_HEIGHT);
define( 'HEADER_IMAGE_WIDTH', apply_filters( 'commonblog_header_image_width', TCB_CUSTOM_HEADER_DEFAULT_WIDTH ) );
define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'commonblog_header_image_height', $custom_header_image_height ) );
if ( ! defined( 'NO_HEADER_TEXT' ) )
define( 'NO_HEADER_TEXT', true );
add_custom_image_header( '', 'commonblog_admin_header_callback' );
}
add_action("after_setup_theme", "common_blog_after_setup_theme");
/**
* Theme init
*/
function common_blog_init() {
// Set up Widget Area's
// Beside Menu
register_sidebar( array(
'name' => __( 'Beside Menu', TCB_TEXT_DOMAIN ),
'id' => 'beside-menu',
'description' => __( 'Widget area, right of the menu.', TCB_TEXT_DOMAIN ),
'before_widget' => '
max_num_pages; if ( !$pages ) { $pages = 1; } } if ( 1 != $pages ) { echo "
'.TCB_THEME_NAME.' settings saved.
'.TCB_THEME_NAME.' settings reset.
/ $depth, 'max_depth' => $args[ 'max_depth' ] ) ) ) ?>