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