__( 'Primary Navigation', 'blacklabel' ),
'foot_menu' => __( 'Footer Navigation', 'blacklabelfoot' )
) );
}
if (function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'RightSidebar',
'after_widget' => '
'
));
if (function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Footer',
'after_widget' => ''
));
function bls_comment($comment, $args, $depth) {
$GLOBALS['comment'] = $comment; ?>
id="li-comment-">
comment_approved == '0') : ?>
id="li-comment-">
cat_ID] = $bls_cat->category_nicename;
}
$categories_tmp = array_unshift($bls_categories, "Select a category:");
$number_entries = array("Select a Number:","1","2","3","4","5","6","7","8","9","10" );
$options = array(
array(
"type" => "open",
"id" => $shortname."_temp",
"std" => ""
),
array(
"name" => "Display image logo?",
"type" => "checkbox",
"id" => $shortname."_text_logo",
"std" => "false"
),
array(
"name" => "Logo Url",
"type" => "text",
"id" => $shortname."_logo",
"desc" => "If you want to display your own logo put the url here (227 x 70 pixels)",
"std" => ""
),
array(
"name" => "Hide Social Buttons?",
"type" => "checkbox",
"id" => $shortname."_hide_sc_button",
"std" => "false"
),
array(
"name" => "Facebook Link",
"type" => "text",
"id" => $shortname."_fb",
"desc" => "Your Facebook page Link.",
"std" => "http://www.facebook.com/yourName"
),
array(
"name" => "Twitter Link",
"type" => "text",
"id" => $shortname."_twitter",
"desc" => "Your Twitter page Link",
"std" => "http://twitter.com/yourName"
),
array(
"name" => "Rss Feed Link",
"type" => "text",
"id" => $shortname."_rss",
"desc" => "Your Feedburner URL",
"std" => "http://www.yourblog.com/feed"
),
array(
"name" => "Top Banner Ad Code",
"type" => "textarea",
"id" => $shortname."_tb",
"desc" => "Paste your Top Banner Advertisement Code Above(468 x 60)",
"std" => ""),
array(
"type" => "close",
"id" => $shortname."_temp",
"std" => ""
)
);
function mytheme_add_admin() {
global $themename, $shortname, $options;
$optionvar = array();
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( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] );
}
}
update_option( $shortname."_options", $optionvar );
header("Location: themes.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: themes.php?page=functions.php&reset=true");
die;
}
}
add_theme_page($themename." Options", "".$themename." Options", 'edit_themes', basename(__FILE__), 'mytheme_admin');
}
function mytheme_admin() {
global $themename, $shortname, $options, $option_values;
if ( isset($_REQUEST['saved']) && $_REQUEST['saved'] ) echo ''.$themename.' settings saved.
';
if ( isset($_REQUEST['reset']) && $_REQUEST['reset'] ) echo ''.$themename.' settings reset.
';
?>