Skip to content

Commit

Permalink
インデックスエントリーカード・関連記事エントリーカードの「更新日が存在しない場合は投稿日を表示」を削除
Browse files Browse the repository at this point in the history
  • Loading branch information
yhira committed Jun 7, 2023
1 parent 8e51bcf commit a710d86
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 14 deletions.
14 changes: 8 additions & 6 deletions lib/page-settings/index-forms.php
Expand Up @@ -214,12 +214,14 @@
echo '</div>';

generate_checkbox_tag(OP_ENTRY_CARD_POST_DATE_VISIBLE , is_entry_card_post_date_visible(), __( '投稿日の表示', THEME_NAME ));
//表示しないとき
$is_not_allowed = is_entry_card_post_date_visible();
$is_not_allowed = $is_not_allowed || !is_entry_card_post_update_visible();
echo '<div class="indent'.get_not_allowed_form_class(!$is_not_allowed, true).'">';
generate_checkbox_tag(OP_ENTRY_CARD_POST_DATE_OR_UPDATE_VISIBLE , is_entry_card_post_date_or_update_visible(), __( '更新日が存在しない場合は投稿日を表示', THEME_NAME ));
echo '</div>';
echo '<br>';

// //表示しないとき
// $is_not_allowed = is_entry_card_post_date_visible();
// $is_not_allowed = $is_not_allowed || !is_entry_card_post_update_visible();
// echo '<div class="indent'.get_not_allowed_form_class(!$is_not_allowed, true).'">';
// generate_checkbox_tag(OP_ENTRY_CARD_POST_DATE_OR_UPDATE_VISIBLE , is_entry_card_post_date_or_update_visible(), __( '更新日が存在しない場合は投稿日を表示', THEME_NAME ));
// echo '</div>';

generate_checkbox_tag(OP_ENTRY_CARD_POST_UPDATE_VISIBLE , is_entry_card_post_update_visible(), __( '更新日の表示', THEME_NAME ));
echo '<br>';
Expand Down
4 changes: 3 additions & 1 deletion lib/page-settings/index-funcs.php
Expand Up @@ -219,7 +219,9 @@ function is_entry_card_post_date_visible(){
define('OP_ENTRY_CARD_POST_DATE_OR_UPDATE_VISIBLE', 'entry_card_post_date_or_update_visible');
if ( !function_exists( 'is_entry_card_post_date_or_update_visible' ) ):
function is_entry_card_post_date_or_update_visible(){
return get_theme_option(OP_ENTRY_CARD_POST_DATE_OR_UPDATE_VISIBLE, 1);
// return get_theme_option(OP_ENTRY_CARD_POST_DATE_OR_UPDATE_VISIBLE, 1);
//ややこしいので表示にして廃止
return true;
}
endif;

Expand Down
14 changes: 8 additions & 6 deletions lib/page-settings/single-forms.php
Expand Up @@ -251,12 +251,14 @@
echo '</div>';

generate_checkbox_tag(OP_RELATED_ENTRY_CARD_POST_DATE_VISIBLE , is_related_entry_card_post_date_visible(), __( '投稿日の表示', THEME_NAME ));
//表示しないとき
$is_not_allowed = is_related_entry_card_post_date_visible();
$is_not_allowed = $is_not_allowed || !is_related_entry_card_post_update_visible();
echo '<div class="indent'.get_not_allowed_form_class(!$is_not_allowed, true).'">';
generate_checkbox_tag(OP_RELATED_ENTRY_CARD_POST_DATE_OR_UPDATE_VISIBLE , is_related_entry_card_post_date_or_update_visible(), __( '更新日が存在しない場合は投稿日を表示', THEME_NAME ));
echo '</div>';
echo '<br>';

// //表示しないとき
// $is_not_allowed = is_related_entry_card_post_date_visible();
// $is_not_allowed = $is_not_allowed || !is_related_entry_card_post_update_visible();
// echo '<div class="indent'.get_not_allowed_form_class(!$is_not_allowed, true).'">';
// generate_checkbox_tag(OP_RELATED_ENTRY_CARD_POST_DATE_OR_UPDATE_VISIBLE , is_related_entry_card_post_date_or_update_visible(), __( '更新日が存在しない場合は投稿日を表示', THEME_NAME ));
// echo '</div>';

generate_checkbox_tag(OP_RELATED_ENTRY_CARD_POST_UPDATE_VISIBLE , is_related_entry_card_post_update_visible(), __( '更新日の表示', THEME_NAME ));
echo '<br>';
Expand Down
4 changes: 3 additions & 1 deletion lib/page-settings/single-funcs.php
Expand Up @@ -155,7 +155,9 @@ function is_related_entry_card_post_date_visible(){
define('OP_RELATED_ENTRY_CARD_POST_DATE_OR_UPDATE_VISIBLE', 'related_entry_card_post_date_or_update_visible');
if ( !function_exists( 'is_related_entry_card_post_date_or_update_visible' ) ):
function is_related_entry_card_post_date_or_update_visible(){
return get_theme_option(OP_RELATED_ENTRY_CARD_POST_DATE_OR_UPDATE_VISIBLE, 1);
// return get_theme_option(OP_RELATED_ENTRY_CARD_POST_DATE_OR_UPDATE_VISIBLE, 1);
//ややこしいので表示にして廃止
return true;
}
endif;

Expand Down

0 comments on commit a710d86

Please sign in to comment.