Commits

Doug Stewart committed faddf47

Baby steps towards localization.

Comments (0)

Files changed (3)

includes/functions/admin.php

  */
 function lblg_add_admin() {
 	global $lblg_themename;
-    add_theme_page( "$lblg_themename Settings", "$lblg_themename Settings", 'edit_theme_options', 'lblg_options_page' , 'lblg_admin' );
+    add_theme_page( "$lblg_themename " . __( 'Settings', 'lblg' ), "$lblg_themename " . __( 'Settings', 'lblg' ), 'edit_theme_options', 'lblg_options_page' , 'lblg_admin' );
 }
 add_action( 'admin_menu', 'lblg_add_admin' );
 
 <?php
 	lblg_after_admin_header();
 
-	if ( isset( $_REQUEST['settings-updated'] ) ) echo '<div id="message" class="updated under-h2"><p><strong>'.$lblg_themename.' settings updated.</strong></p></div>';
+	if ( isset( $_REQUEST['settings-updated'] ) ) echo '<div id="message" class="updated under-h2"><p><strong>'.$lblg_themename.' '. __( 'settings updated', 'lblg' ) .'.</strong></p></div>';
 
 	settings_fields( $lblg_shortname . '_theme_options' ); 
 ?>
 	$save_name = $lblg_shortname . "_theme_options[save]";
 	$reset_name = $lblg_shortname . "_theme_options[reset]";
 	
-	submit_button( "Save changes", "primary", $save_name, false );
- 	submit_button( "Reset to defaults", "secondary", $reset_name, false );
+	submit_button( __( 'Save changes', 'lblg' ), "primary", $save_name, false );
+ 	submit_button( __( 'Reset to defaults', 'lblg'), "secondary", $reset_name, false );
 }
 
 /**

includes/functions/headers.php

 		'fern-crop' => array(
 			'url' => '%s/images/headers/fern-crop.jpg',
 			'thumbnail_url' => '%s/images/headers/fern-crop-thumbnail.jpg',
-			'description' => 'Fern'
+			'description' => __( 'Fern', 'lblg' )
 		),
 		'fireworks' => array(
 			'url' => '%s/images/headers/fireworks.jpg',
 			'thumbnail_url' => '%s/images/headers/fireworks-thumbnail.jpg',
-			'description' => 'Fireworks'
+			'description' => __( 'Fireworks', 'lblg' )
 		),
 		'flowers' => array(
 			'url' => '%s/images/headers/flowers.jpg',
 			'thumbnail_url' => '%s/images/headers/flowers-thumbnail.jpg',
-			'description' => 'Flowers'
+			'description' => __( 'Flowers', 'lblg' )
 		),
 		'ivy' => array(
 			'url' => '%s/images/headers/ivy.jpg',
 			'thumbnail_url' => '%s/images/headers/ivy-thumbnail.jpg',
-			'description' => 'Just plain ivy'
+			'description' => __( 'Just plain ivy', 'lblg' )
 		),
 		'ivy_in_winter' => array(
 			'url' => '%s/images/headers/ivy_in_winter.jpg',
 			'thumbnail_url' => '%s/images/headers/ivy_in_winter-thumbnail.jpg',
-			'description' => 'Ivy in Winter'
+			'description' => __( 'Ivy in Winter', 'lblg' )
 		),
 		'jet_trail' => array(
 			'url' => '%s/images/headers/jet_trail.jpg',
 			'thumbnail_url' => '%s/images/headers/jet_trail-thumbnail.jpg',
-			'description' => 'Jet trail'
+			'description' => __( 'Jet trail', 'lblg' )
 		),
 		'lakeshore' => array(
 			'url' => '%s/images/headers/lakeshore.jpg',
 			'thumbnail_url' => '%s/images/headers/lakeshore-thumbnail.jpg',
-			'description' => 'Lakeshore'
+			'description' => __(' Lakeshore', 'lblg' )
 		),
 		'little_big_tex-crop' => array(
 			'url' => '%s/images/headers/little_big_tex-crop.jpg',
 			'thumbnail_url' => '%s/images/headers/little_big_tex-crop-thumbnail.jpg',
-			'description' => 'Fireworks'
+			'description' => __( 'Little Big Tex', 'lblg' )
 		),
 		'orm' => array(
 			'url' => '%s/images/headers/orm.jpg',
 			'thumbnail_url' => '%s/images/headers/orm-thumbnail.jpg',
-			'description' => 'Fireworks'
+			'description' => __( 'Old Red Museum', 'lblg' )
 		),
 		'philly_sunset' => array(
 			'url' => '%s/images/headers/philly_sunset.jpg',
 			'thumbnail_url' => '%s/images/headers/philly_sunset-thumbnail.jpg',
-			'description' => 'Philly Sunset'
+			'description' => __( 'Philly Sunset', 'lblg' )
 		),
 		'shadowtrees' => array(
 			'url' => '%s/images/headers/shadowtrees.jpg',
 			'thumbnail_url' => '%s/images/headers/shadowtrees-thumbnail.jpg',
-			'description' => 'Fireworks'
+			'description' => __( 'Shadow Trees', 'lblg' )
 		),
 		'snowy_day' => array(
 			'url' => '%s/images/headers/snowy_day.jpg',
 			'thumbnail_url' => '%s/images/headers/snowy_day-thumbnail.jpg',
-			'description' => 'Snowy Day'
+			'description' => __( 'Snowy Day', 'lblg' )
 		),
 		'summer_dock' => array(
 			'url' => '%s/images/headers/summer_dock.jpg',
 			'thumbnail_url' => '%s/images/headers/summer_dock-thumbnail.jpg',
-			'description' => 'Summer Dock'
+			'description' => __( 'Summer Dock', 'lblg' )
 		),
 		'sunlight_streaming' => array(
 			'url' => '%s/images/headers/sunlight_streaming.jpg',
 			'thumbnail_url' => '%s/images/headers/sunlight_streaming-thumbnail.jpg',
-			'description' => 'Sunlight Streaming'
+			'description' => __( 'Sunlight Streaming', 'lblg' )
 		),
 		'three_flags' => array(
 			'url' => '%s/images/headers/three_flags.jpg',
 			'thumbnail_url' => '%s/images/headers/three_flags-thumbnail.jpg',
-			'description' => 'Fireworks'
+			'description' => __( 'Three Flags', 'lblg' )
 		),
 		'waterfall-crop' => array(
 			'url' => '%s/images/headers/waterfall-crop.jpg',
 			'thumbnail_url' => '%s/images/headers/waterfall-crop-thumbnail.jpg',
-			'description' => 'Fireworks'
+			'description' => __( 'Waterfall', 'lblg' )
 		),
 	) );
 }
 function lblg_header_style() {
 ?>
 <style type="text/css">
-#header{
+div#header{
 	background: url(<?php header_image() ?>) bottom left no-repeat;
 	/*background-size: cover;*/
-	background-height: <?php get_custom_header()->height; ?>;
-	background-width: <?php get_custom_header()->width; ?>;
-	height: <?php get_custom_header()->height; ?>;
+	background-height: <?php echo get_custom_header()->height; ?>px;
+	background-width: <?php echo get_custom_header()->width; ?>px;
+	height: <?php echo get_custom_header()->height; ?>px;
 }
 <?php if ( 'blank' == get_header_textcolor() ) { ?>
 #header h1, #header #description {

includes/parent-options.php

 						"std" => "1",
 						"type" => "checkbox"),
 
+				"use_dynamic_header" => array(	"name" => "Use Dynamic Headers",
+						"desc" => 'Check this box if you want the header to dynamically resize to the size of header images',
+						"std" => "1",
+						"type" => "checkbox"),
+
 				"blog_meta_info" => array(	"name" => "Blog Meta Info",
 						"type" => "subhead"),