Skip to content

Commit

Permalink
メイド・イン・ヘブンスキンのアップデート v2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yhira committed Apr 27, 2024
1 parent 3ccc313 commit 1654414
Show file tree
Hide file tree
Showing 11 changed files with 547 additions and 72 deletions.
87 changes: 30 additions & 57 deletions skins/skin-made-in-heaven/assets/css/admin.css
Expand Up @@ -11,6 +11,7 @@
content: '\f487';
font-family: 'dashicons';
font-weight: normal;
vertical-align: middle;
}

.wp-customizer #_customize-input-entry_card_type,
Expand All @@ -24,97 +25,69 @@
** ラジオボタン
*******************************************************************************/

#customize-control-hvn_header_fade_setting,
#customize-control-hvn_header_animation_setting,
#customize-control-hvn_numeric_list_set2_setting,
#customize-control-hvn_icon_box_set1_setting,
#customize-control-hvn_tab_box_set1_setting,
#customize-control-hvn_faq_set1_setting {
[id*="section-hvn"] .wp-color-result-text,
[id*="section-hvn"] .color-picker-hex,
[id*="section-hvn"] select,
[id*="section-hvn"] input,
[id*="section-hvn"] button {
border-radius: 0!important;
}

[id*="section-hvn"] .customize-control-radio {
display: flex;
flex-wrap: wrap;
}

#customize-control-hvn_header_fade_setting .description,
#customize-control-hvn_header_animation_setting .description,
#customize-control-hvn_numeric_list_set2_setting .description,
#customize-control-hvn_icon_box_set1_setting .description,
#customize-control-hvn_tab_box_set1_setting .description,
#customize-control-hvn_faq_set1_setting .description {
[id*="section-hvn"] .customize-control-radio .description {
width: 100%;
}

#customize-control-hvn_header_fade_setting .customize-inside-control-row,
#customize-control-hvn_header_animation_setting .customize-inside-control-row,
#customize-control-hvn_numeric_list_set2_setting .customize-inside-control-row,
#customize-control-hvn_icon_box_set1_setting .customize-inside-control-row,
#customize-control-hvn_tab_box_set1_setting .customize-inside-control-row,
#customize-control-hvn_faq_set1_setting .customize-inside-control-row {
[id*="section-hvn"] .customize-control-radio .customize-inside-control-row {
margin: 0;
}

#customize-control-hvn_header_fade_setting input,
#customize-control-hvn_header_animation_setting input,
#customize-control-hvn_numeric_list_set2_setting input,
#customize-control-hvn_icon_box_set1_setting input,
#customize-control-hvn_tab_box_set1_setting input,
#customize-control-hvn_faq_set1_setting input {
[id*="section-hvn"] .customize-control-radio input {
display: none;
}

#customize-control-hvn_header_fade_setting label,
#customize-control-hvn_header_animation_setting label,
#customize-control-hvn_numeric_list_set2_setting label,
#customize-control-hvn_icon_box_set1_setting label,
#customize-control-hvn_tab_box_set1_setting label,
#customize-control-hvn_faq_set1_setting label {
[id*="section-hvn"] .customize-control-radio label {
box-shadow: inset 1px 1px 0 0 #007cba, 1px 1px 0 0 #007cba, 1px 0 0 0 #007cba, 0 1px 0 0 #007cba;
color: #007cba;
padding: 5px 10px;
}

#customize-control-hvn_header_fade_setting input:checked ~ label,
#customize-control-hvn_header_animation_setting input:checked ~ label,
#customize-control-hvn_numeric_list_set2_setting input:checked ~ label,
#customize-control-hvn_icon_box_set1_setting input:checked ~ label,
#customize-control-hvn_tab_box_set1_setting input:checked ~ label,
#customize-control-hvn_faq_set1_setting input:checked ~ label {
[id*="section-hvn"] .customize-control-radio input:checked ~ label {
background-color: #007cba;
color: #fff;
}


/*******************************************************************************
** エラー表示
** アコーディオン表示項目
*******************************************************************************/


/* スライドインメニュータイトル */

#_customize-input-hvn_mobile_text_setting:invalid,

/* 「もっと見る」テキスト */

#_customize-input-hvn_button_more_setting:invalid,

/* 「次のページ」テキスト */

#_customize-input-hvn_button_next_setting:invalid,

/* パンくずリストテキスト */
/* コメント */

#_customize-input-hvn_breadcrumbs_setting:invalid,
body:not(:has(#_customize-input-hvn_comment_setting:checked)) [id*="customize-control-hvn_comment_img"] {
display: none;
}

/* NEWマーク表示日数 */
/* タイトル */
body:not(:has(#_customize-input-hvn_tcheck_option_setting:checked)) [id*="customize-control-hvn_title"] {
display: none;
}

#_customize-input-hvn_index_new_setting:invalid,
/*******************************************************************************
** エラー表示
*******************************************************************************/

/* テキストサイズ */

#_customize-input-hvn_appea_font_size_setting:invalid,
/* カラーピッカー */

/* 不透明度 */
.wp-color-picker.iris-error,

#_customize-input-hvn_header_opacity_setting:invalid {
[id*="_customize-input-hvn_"]:invalid {
animation: shake-x 1s;
background-color: rgba(255 0 0 / 0.2);
border-color: red;
Expand Down
2 changes: 1 addition & 1 deletion skins/skin-made-in-heaven/assets/css/h2/h2-13.css
Expand Up @@ -22,7 +22,7 @@
}

.hvn-dark .article h2 {
border-color: #696969;
--hover-color: var(--main-color);
}

.article h2::before {
Expand Down
2 changes: 2 additions & 0 deletions skins/skin-made-in-heaven/assets/css/h2/h2-14.css
Expand Up @@ -16,5 +16,7 @@
.hvn-dark .article h2,
.hvn-dark .main .article .widget-title,
.hvn-dark .main .under-entry-content h2 {
border-color: var(--main-color);
box-shadow: 6px 6px var(--main-color);
color : var(--cocoon-text-color);
}
1 change: 1 addition & 0 deletions skins/skin-made-in-heaven/functions.php
Expand Up @@ -6,6 +6,7 @@
global $_MOBILE_COPY_BUTTON;
global $_HVN_EYECATCH;
global $_HVN_NOTICE;
global $_HVN_OPTION;

$skin_url = get_skin_url();
// ふわっと追加
Expand Down
11 changes: 10 additions & 1 deletion skins/skin-made-in-heaven/lib/function.php
Expand Up @@ -42,7 +42,15 @@ function hvn_sanitize_number_range($number, $setting) {
// テキスト
if (!function_exists('hvn_sanitize_text')):
function hvn_sanitize_text($text, $setting) {
return ($text ? $text : $setting->default);
return ($text ? strip_tags($text) : $setting->default);
}
endif;


// パレット
if (!function_exists('hvn_sanitize_color')):
function hvn_sanitize_color($color, $setting) {
return (sanitize_hex_color($color) ? $color : $setting->default);
}
endif;

Expand Down Expand Up @@ -270,6 +278,7 @@ function hvn_add_header() {
// タイトルテキスト
$msg = get_theme_mod('hvn_header_message_setting');
if ($msg) {
$msg = do_shortcode($msg);
$msg = "<div class=message><div>{$msg}</div></div>";
}

Expand Down
7 changes: 6 additions & 1 deletion skins/skin-made-in-heaven/lib/hook-wp.php
Expand Up @@ -6,10 +6,12 @@
// カスタマイザー追加
//******************************************************************************
add_action('customize_register', function($wp_customize) {
global $_HVN_OPTION;

$wp_customize->add_panel(
'hvn_cocoon',
array(
'title' => 'Cocoon拡張設定',
'title' => 'メイド・イン・ヘブン設定',
'priority' => 300,
)
);
Expand All @@ -19,6 +21,9 @@
hvn_main($wp_customize);
hvn_header($wp_customize);
hvn_editor($wp_customize);
if ($_HVN_OPTION) {
hvn_option($wp_customize);
}
});


Expand Down
15 changes: 12 additions & 3 deletions skins/skin-made-in-heaven/lib/panel-color.php
Expand Up @@ -35,7 +35,10 @@ function hvn_color($wp_customize) {
);


$wp_customize->add_setting('hvn_main_color_setting', array('default' => HVN_MAIN_COLOR));
$wp_customize->add_setting('hvn_main_color_setting', array(
'default' => HVN_MAIN_COLOR,
'sanitize_callback' => 'hvn_sanitize_color',
));
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize,
Expand All @@ -49,7 +52,10 @@ function hvn_color($wp_customize) {
);


$wp_customize->add_setting('hvn_body_color_setting', array('default' => HVN_BODY_COLOR));
$wp_customize->add_setting('hvn_body_color_setting', array(
'default' => HVN_BODY_COLOR,
'sanitize_callback' => 'hvn_sanitize_color',
));
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize,
Expand All @@ -63,7 +69,10 @@ function hvn_color($wp_customize) {
);


$wp_customize->add_setting('hvn_text_color_setting', array('default' => HVN_TEXT_COLOR));
$wp_customize->add_setting('hvn_text_color_setting', array(
'default' => HVN_TEXT_COLOR,
'sanitize_callback' => 'hvn_sanitize_color',
));
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize,
Expand Down

0 comments on commit 1654414

Please sign in to comment.