質問編集履歴
1
カスタムフィールド値取得と判別
test
CHANGED
File without changes
|
test
CHANGED
@@ -102,11 +102,9 @@
|
|
102
102
|
|
103
103
|
|
104
104
|
|
105
|
-
|
106
|
-
|
107
105
|
//クイック編集にカスタムフィールド(状況)の入力フォームを表示
|
108
106
|
|
109
|
-
function display_my_custom_quickedit($publish_name, $post_type) {
|
107
|
+
function display_my_custom_quickedit( $publish_name, $post_type ) {
|
110
108
|
|
111
109
|
static $print_nonce = TRUE;
|
112
110
|
|
@@ -126,17 +124,19 @@
|
|
126
124
|
|
127
125
|
<label class="inline-edit-group">
|
128
126
|
|
127
|
+
<?php $publish_type = get_field('publish_type');?>
|
128
|
+
|
129
|
-
<?php
|
129
|
+
<?php
|
130
130
|
|
131
131
|
switch ( $publish_name ) {
|
132
132
|
|
133
133
|
case 'publish_type':
|
134
134
|
|
135
|
-
?><span class="title">状況</span>
|
136
|
-
|
137
|
-
<input type="radio" name="free" value="free">無
|
138
|
-
|
139
|
-
<input type="radio" name="free" value="premium">有
|
135
|
+
?><span class="title">状況</span><br>
|
136
|
+
|
137
|
+
<label style="background: #fff;padding: 0px 0 0 10px;border: 1px solid #ddd;"><input type="radio" name="free" value="free"<?php if ($publish_type == 'free'):?>checked<?php endif; ?>>無<br></label>
|
138
|
+
|
139
|
+
<label style="background: #fff;padding: 0px 0 0 10px;border: 1px solid #ddd;"><input type="radio" name="free" value="premium"<?php if ($publish_type == 'premium'):?>checked<?php endif; ?>>有</label>
|
140
140
|
|
141
141
|
<?php
|
142
142
|
|