WP PLUGIN 

・選択カスタムフィールドを読み取り専用表示するよう修正
This commit is contained in:
2021-06-26 12:10:11 +09:00
parent 188966cff5
commit b69c5fbd88
4 changed files with 30 additions and 13 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ Plugin URI: https://develop.n-k-y.net/wordpress/wp_plugin/apop/
Author: NBK45 Author: NBK45
Author URI: https://develop.n-k-y.net Author URI: https://develop.n-k-y.net
Description: 通常表示、検索表示、タクソノミー毎に投稿の表示順を設定するプラグイン Description: 通常表示、検索表示、タクソノミー毎に投稿の表示順を設定するプラグイン
Version: 1.1.1 Version: 1.1.2
License: GPLv2 License: GPLv2
*/ */
+14 -4
View File
@@ -109,15 +109,25 @@ dl.apop-setting-list-dd dd ul {
margin-bottom: 1em; margin-bottom: 1em;
} }
dl.apop-setting-list-dd dd label { dl.apop-setting-list-dd dd li {
display: block; display: flex;
margin-bottom: .3em; justify-content: space-between;
} }
dl.apop-setting-list-dd dd input { dl.apop-setting-list-dd dd label {
width: 25%;
margin-bottom: .3em;
cursor: inherit;
}
dl.apop-setting-list-dd input {
width: 100%; width: 100%;
} }
dl.apop-setting-list-dd .sort-custom-field-input {
width: 75%;
}
.form-table tr { .form-table tr {
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
} }
+4 -1
View File
@@ -4,7 +4,7 @@ Tags: 投稿,表示順,投稿表示順,カテゴリー,タグ,カスタム分類
Requires at least: 4.9 Requires at least: 4.9
Tested up to: 5.7.2 Tested up to: 5.7.2
Requires PHP: 7.0 Requires PHP: 7.0
Stable tag: 1.1.1 Stable tag: 1.1.2
License: GPLv2 or later License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -66,5 +66,8 @@ License URI: https://www.gnu.org/licenses/gpl-2.0.html
= 1.1.1 = = 1.1.1 =
バグ修正:カスタムフィールドのselected属性の追加漏れ修正 バグ修正:カスタムフィールドのselected属性の追加漏れ修正
= 1.1.2 =
選択カスタムフィールドを読み取り専用表示するよう修正
== Upgrade Notice == == Upgrade Notice ==
No information No information
+11 -7
View File
@@ -10,19 +10,23 @@
<?php <?php
if ( $this->custom_field_type[ $type ][ $idx ] == '2' ) { if ( $this->custom_field_type[ $type ][ $idx ] == '2' ) {
$custom_field_prefix = APOP_CUSTOM_FIELD_PREFIX; $custom_field_prefix = APOP_CUSTOM_FIELD_PREFIX;
$disabled = '';
$read_only_class = '';
} else { } else {
$custom_field_prefix = ''; $custom_field_prefix = '';
$disabled = ' disabled';
$read_only_class = ' ※カスタムフィールドから変更してください';
} }
?> ?>
<?php if ( ! empty( $custom_field_prefix ) ): ?> <li>
<li><label><?php echo esc_html( $item ); ?></label> <label><?php echo esc_html( $item ); ?></label>
<div class="sort-custom-field-input">
<input type="text" <input type="text"
name="<?php echo esc_attr( $custom_field_prefix . $item ); ?>" name="<?php echo esc_attr( $custom_field_prefix . $item ); ?>"
value="<?php echo esc_attr( $this->get_custom_field_data( $item, $custom_field_prefix ) ); ?>"/> value="<?php echo esc_attr( $this->get_custom_field_data( $item, $custom_field_prefix ) ); ?>"<?php echo esc_attr( $disabled ); ?>/>
</li> <?php echo esc_html( $read_only_class ); ?>
<?php else: ?> </div>
<?php echo esc_html( $item ); ?> ]はカスタムフィールドから設定してください </li>
<?php endif; ?>
<?php endif; ?> <?php endif; ?>
<?php endforeach; ?> <?php endforeach; ?>
</ul> </ul>