WP PLUGIN
・選択カスタムフィールドを読み取り専用表示するよう修正
This commit is contained in:
@@ -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