Permalink
Browse files

modified: css/admin-options.css

    modified:   css/colors.css
    modified:   css/layout-fluid.css
    modified:   functions.php
    modified:   languages/ja.mo
    modified:   languages/ja.po
  • Loading branch information...
tenman committed Apr 11, 2012
1 parent 416b49b commit 3ccff5afa1814e5c08995008a2934b0bae92973b
Showing with 68 additions and 40 deletions.
  1. +12 −0 css/admin-options.css
  2. +1 −0 css/colors.css
  3. +3 −3 css/layout-fluid.css
  4. +46 −31 functions.php
  5. BIN languages/ja.mo
  6. +6 −6 languages/ja.po
View
@@ -22,4 +22,16 @@
.theme-option-menu{
margin-bottom:3em;
margin-bottom:3rem;
+}
+
+input[type="radio"]{
+ margin-left:1em;
+ margin-right:1em;
+}
+input[type="text"]{
+ width:20em;
+}
+.submit-box{
+ margin:50px; 0;
+
}
View
@@ -13,6 +13,7 @@ a:hover{
color:#333;
}
html{
+ background:rgba(200,200,200,0.3);
}
#page{
background:rgba(255,255,255,0.8);
View
@@ -9,9 +9,6 @@
html{
margin:0;
padding:0;
- background:rgba(200,200,200,0.3);
- max-width:1280px;
- min-width:240px;
}
body {
font-size:100%;
@@ -28,6 +25,9 @@ h3 a{
#page{
width:90%;
margin:0 auto;
+ max-width:1280px;
+ min-width:240px;
+
}
article{
width:66.6%;
View
@@ -59,6 +59,8 @@
$enough_register_nav_menus_args = array(
'primary' => __( 'Main navigation', 'enough' )
);
+ register_nav_menus( $enough_register_nav_menus_args );
+
/**
*
*
@@ -123,8 +125,10 @@
*/
if( !function_exists( 'enough_theme_setup' ) ){
function enough_theme_setup(){
- global $enough_sidebar_args, $enough_register_nav_menus_args;
- register_nav_menus( $enough_register_nav_menus_args );
+ global $enough_sidebar_args;
+ global $enough_register_nav_menus_args;
+ global $enough_admin_options_setting;
+
register_sidebar( $enough_sidebar_args );
add_theme_support( 'automatic-feed-links' );
add_theme_support( 'post-thumbnails' );
@@ -168,14 +172,18 @@ function enough_theme_setup(){
*
*
*/
- foreach($enough_admin_options_setting as $setting){
- $function_name = $setting['option_name'].'_validate';
- if(!function_exists($function_name)){
- $message = sprintf(__('If you add %s when you must create function %s for data validation','enough'),$setting['option_name'],$function_name);
- printf('<script type="text/javascript">alert(\'%s\');</script>',$message);
- return;
- }
- }
+ if( version_compare(PHP_VERSION, '5.3.0', '<' ) ) {
+ if(isset( $enough_admin_options_setting ) and is_array( $enough_admin_options_setting ) ){
+ foreach($enough_admin_options_setting as $setting){
+ $function_name = $setting['option_name'].'_validate';
+ if(!function_exists($function_name)){
+ $message = sprintf(__('If you add %s when you must create function %s for data validation','enough'),$setting['option_name'],$function_name);
+ printf('<script type="text/javascript">alert(\'%s\');</script>',$message);
+ return;
+ }
+ }
+ }
+ }
}
@@ -529,9 +537,10 @@ function enough_add_body_class( $class ) {
*/
if ( ! function_exists( 'enough_small_device_helper' ) ) {
function enough_small_device_helper(){
- $enough_title_length = round(strlen(get_bloginfo('name')) );
- $enough_description_length = round(strlen(get_bloginfo('description')),0);
- $enough_header_image_uri = get_header_image();
+ global $is_IE;
+ $enough_title_length = round(strlen(get_bloginfo('name')) );
+ $enough_description_length = round(strlen(get_bloginfo('description')),0);
+ $enough_header_image_uri = get_header_image();
?>
<script type="text/javascript">
(function(){
@@ -704,7 +713,7 @@ function fontResize(){
if (jQuery('ul').is('.tagcloud-wrapper')) {
jQuery('div.tagcloud').unwrap();
}
- <?php if($is_IE){?>
+ <?php if( $is_IE ){?>
if ( ! jQuery('body').is('[class^="enough-w"]')) {
location.reload();
}
@@ -1174,7 +1183,7 @@ function create_form(){
$lines .= '<p><input accesskey="'.esc_attr($this->accesskey[$i]).'" type="checkbox" name="enough_option_values['.$key.'][]" value="'.esc_attr__(enough_theme_option($key,'option_value'),'enough').'"';
$i++;
$check = enough_theme_option($key);
- if(enough_theme_option($key,'option_value') == $val or array_search(enough_theme_option($key,'option_value'),$check) !== false ){
+ if( is_array( $check ) and (enough_theme_option($key,'option_value') == $val or array_search(enough_theme_option($key,'option_value'),$check) !== false ) ){
$lines .= 'checked = "checked" />'.enough_theme_option($key,'option_value');
}elseif(array_search(enough_theme_option($key,'option_value'),$check) == false){
$lines .= ' />'.enough_theme_option($key,'option_value');
@@ -1185,7 +1194,7 @@ function create_form(){
'" type="checkbox" name="enough_option_values['.$key.'][]" value="'.
esc_attr__($val_check_box,'enough').'"';
$i++;
- if(enough_theme_option($key) == $val_check_box or array_search($val_check_box,$check) !== false){
+ if(is_array( $check ) and (enough_theme_option($key) == $val_check_box or array_search($val_check_box,$check) !== false ) ){
$lines .= 'checked = "checked" />'.$val_check_box;
}elseif(array_search($val_check_box,$check) == false){
$lines .= ' />'.$val_check_box;
@@ -1205,24 +1214,30 @@ function create_form(){
$lines .= '<a href="#wpwrap">Top</a>';
$lines .= '<h3 class="setting-title">'. enough_theme_option($key,'title').'</h3>';
$lines .= '<strong class="setting-excerpt">'.enough_theme_option($key,'excerpt').'</strong>';
- $lines .= '<p><input accesskey="'.esc_attr($this->accesskey[$i]).'" type="radio" name="enough_option_values['.$key.']" value="'.esc_attr__(enough_theme_option($key,'option_value'),'enough').'"';
+ $lines .= '<p><label><input accesskey="'.esc_attr($this->accesskey[$i]).'" type="radio" name="enough_option_values['.$key.']" value="'.esc_attr__(enough_theme_option($key,'option_value'),'enough').'"';
$i++;
$check = enough_theme_option($key);
- if(enough_theme_option($key,'option_value') == $val or array_search(enough_theme_option($key,'option_value'),$check) !== false ){
- $lines .= 'checked = "checked" />'.enough_theme_option($key,'option_value');
- }elseif(array_search(enough_theme_option($key,'option_value'),$check) == false){
- $lines .= ' />'.enough_theme_option($key,'option_value');
+
+ if( enough_theme_option($key,'option_value') == $val or (is_array( enough_theme_option($key,'option_value') ) and array_search(enough_theme_option($key,'option_value'),$check) !== false ) ){
+ $lines .= 'checked = "checked" />'.enough_theme_option($key,'option_value'). '</label>';
+ }elseif( ! is_array( $check ) or array_search(enough_theme_option($key,'option_value'),$check) == false ){
+ $lines .= ' />'.enough_theme_option($key,'option_value'). '</label>';
}
$select_values = enough_theme_option($key,'select_values');
- foreach($select_values as $label => $val_check_box){
- $lines .= '<input accesskey="'.esc_attr($this->accesskey[$i]).
- '" type="radio" name="enough_option_values['.$key.']" value="'.
- esc_attr__($val_check_box,'enough').'"';
- $i++;
- if(enough_theme_option($key) == $val_check_box or array_search($val_check_box,$check) !== false){
- $lines .= 'checked = "checked" />'.$val_check_box;
- }elseif(array_search($val_check_box,$check) == false){
- $lines .= ' />'.$val_check_box;
+
+ if(is_array( $select_values ) and !empty( $select_values ) ){
+
+ foreach($select_values as $label => $val_check_box){
+ $lines .= '<label><input accesskey="'.esc_attr($this->accesskey[$i]).
+ '" type="radio" name="enough_option_values['.$key.']" value="'.
+ esc_attr__($val_check_box,'enough').'"';
+ $i++;
+
+ if( enough_theme_option($key) == $val_check_box or (is_array( $check ) and array_search($val_check_box,$check) !== false ) ){
+ $lines .= 'checked = "checked" />'.$val_check_box.'</label>';
+ }elseif( ! is_array( $check ) or array_search($val_check_box,$check) == false ){
+ $lines .= ' />'. $val_check_box.'</label>';
+ }
}
}
$lines .= '</p>';
@@ -1236,7 +1251,7 @@ function create_form(){
*
*
*/
- $lines .= "<div style=\"margin:20px 50px;\"><input type=\"submit\" class=\"button-primary\" value=\"".esc_attr('Save Changes').'" />&nbsp;&nbsp;&nbsp;';
+ $lines .= "<div class=\"submit-box\"><input type=\"submit\" class=\"button-primary\" value=\"".esc_attr('Save Changes').'" />&nbsp;&nbsp;&nbsp;';
$lines .= "<input type=\"submit\" name=\"reset\" class=\"button-primary\" value=\"".esc_attr('Reset All Settings').'" /></form><br style="clear:both;</div>"';
$lines .= "lines";
$add_infomation = '';
View
Binary file not shown.
View
@@ -19,7 +19,7 @@ msgstr ""
#: enough/functions.php:37
#, php-format
msgid "Sidebar %d"
-msgstr ""
+msgstr "サイドバー %d"
#: enough/functions.php:59
msgid "Google tracking code"
@@ -32,11 +32,11 @@ msgstr "グーグルトラッキングコード <a href=\"%1$s\">Google Analytic
#: enough/functions.php:71
msgid "iphone format telephone"
-msgstr ""
+msgstr "iphoneで 電話番号の自動変換"
#: enough/functions.php:72
msgid "Iphone format detection telephone"
-msgstr ""
+msgstr "電話番号フォーマットの自動検知"
#: enough/functions.php:82
msgid "iphone device width settings"
@@ -127,12 +127,12 @@ msgstr "著者 アーカイブ"
#: enough/functions.php:833
msgid "Blog Archives"
-msgstr ""
+msgstr "ブログ アーカイブ"
#: enough/functions.php:928
#, php-format
msgid "If you add %s when you must create function %s for data validation"
-msgstr ""
+msgstr " %s 関数を追加した場合はデータバリデーション用の関数 %sも追加しなければなりません"
#: enough/functions.php:1044
msgid " Theme Settings"
@@ -160,5 +160,5 @@ msgstr "この画面は、簡易表示です"
#: enough/index.php:123
msgid "Continue&nbsp;reading&nbsp;<span class=\"meta-nav\">&rarr;</span>"
-msgstr ""
+msgstr "もっと読む&nbsp;<span class=\"meta-nav\">&rarr;</span>"

0 comments on commit 3ccff5a

Please sign in to comment.