Smart Custom Fields - Version 1.3.1

Version Description

  • Fixed a wysiwyg field bug.
  • Add boolean field.
Download this release

Release Info

Developer inc2734
Plugin Icon wp plugin Smart Custom Fields
Version 1.3.1
Comparing to
See all releases

Code changes from version 1.3.0 to 1.3.1

classes/fields/class.field-boolean.php ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Smart_Custom_Fields_Field_Boolean
5
+ * Version : 1.0.1
6
+ * Author : Toro_Unit, Takashi Kitajima
7
+ * Created : April 6, 2015
8
+ * Modified : April 11, 2015
9
+ * License : GPLv2
10
+ * License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
+ */
12
+
13
+ class Smart_Custom_Fields_Field_Boolean extends Smart_Custom_Fields_Field_Base {
14
+
15
+ /**
16
+ * 必須項目の設定
17
+ *
18
+ * @return array
19
+ */
20
+ protected function init() {
21
+ add_filter( 'smart-cf-validate-get-value', array( $this, 'validate_get_value' ), 10, 2 );
22
+ return array(
23
+ 'type' => 'boolean',
24
+ 'display-name' => __( 'Boolean', 'smart-custom-fields' ),
25
+ 'optgroup' => 'basic-fields',
26
+ );
27
+ }
28
+
29
+ /**
30
+ * 設定項目の設定
31
+ *
32
+ * @return array
33
+ */
34
+ protected function options() {
35
+ return array(
36
+ 'default' => 0,
37
+ 'notes' => '',
38
+ 'true_label' => __( 'Yes', 'smart-custom-fields' ),
39
+ 'false_label' => __( 'No', 'smart-custom-fields' ),
40
+ );
41
+ }
42
+
43
+ /**
44
+ * 投稿画面にフィールドを表示
45
+ *
46
+ * @param int $index インデックス番号
47
+ * @param mixed $value 保存されている値(check のときだけ配列)
48
+ *
49
+ * @return string html
50
+ */
51
+ public function get_field( $index, $value ) {
52
+ $name = $this->get_field_name_in_editor( $index );
53
+ $disabled = $this->get_disable_attribute( $index );
54
+
55
+ $true = sprintf(
56
+ '<label><input type="radio" name="%s" value="1" class="widefat" %s %s />%s ( true )</label>',
57
+ esc_attr( $name ),
58
+ checked( 1, $value, false ),
59
+ disabled( true, $disabled, false ),
60
+ $this->get( 'true_label' )
61
+ );
62
+
63
+ $false = sprintf(
64
+ '<label><input type="radio" name="%s" value="0" class="widefat" %s %s />%s ( false )</label>',
65
+ esc_attr( $name ),
66
+ checked( 0, $value, false ),
67
+ disabled( true, $disabled, false ),
68
+ $this->get( 'false_label' )
69
+ );
70
+
71
+ return $true . $false;
72
+ }
73
+
74
+ /**
75
+ * 設定画面にフィールドを表示(オリジナル項目)
76
+ *
77
+ * @param int $group_key
78
+ * @param int $field_key
79
+ */
80
+ public function display_field_options( $group_key, $field_key ) {
81
+ ?>
82
+ <tr>
83
+ <th><?php esc_html_e( 'Default', 'smart-custom-fields' ); ?></th>
84
+ <td>
85
+ <fieldset>
86
+
87
+ <label>
88
+ <input type="radio"
89
+ name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'default' ) ); ?>"
90
+ value="1"
91
+ <?php checked( 1, $this->get( 'default' ) ); ?> />
92
+ <span><?php echo esc_html( $this->get( 'true_label' ) ); ?> ( true )</span>
93
+ </label>&nbsp;
94
+ <label>
95
+ <input type="radio"
96
+ name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'default' ) ); ?>"
97
+ value="0"
98
+ <?php checked( 0, $this->get( 'default' ) ); ?> />
99
+ <span><?php echo esc_html( $this->get( 'false_label' ) ); ?> ( false )</span>
100
+ </label>
101
+
102
+ </fieldset>
103
+ </td>
104
+ </tr>
105
+ <tr>
106
+ <th><?php esc_html_e( 'TRUE Label', 'smart-custom-fields' ); ?></th>
107
+ <td>
108
+ <input type="text"
109
+ name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'true_label' ) ); ?>"
110
+ class="widefat"
111
+ value="<?php echo esc_attr( $this->get( 'true_label' ) ); ?>"
112
+ />
113
+ </td>
114
+ </tr>
115
+ <tr>
116
+ <th><?php esc_html_e( 'FALSE Label', 'smart-custom-fields' ); ?></th>
117
+ <td>
118
+ <input type="text"
119
+ name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'false_label' ) ); ?>"
120
+ class="widefat"
121
+ value="<?php echo esc_attr( $this->get( 'false_label' ) ); ?>"
122
+ />
123
+ </td>
124
+ </tr>
125
+ <tr>
126
+ <th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
127
+ <td>
128
+ <input type="text"
129
+ name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'notes' ) ); ?>"
130
+ class="widefat"
131
+ value="<?php echo esc_attr( $this->get( 'notes' ) ); ?>"
132
+ />
133
+ </td>
134
+ </tr>
135
+ <?php
136
+ }
137
+
138
+
139
+ /**
140
+ * メタデータの表示時にバリデート
141
+ *
142
+ * @param int|string $value
143
+ * @param string $field_type
144
+ * @return boolean
145
+ */
146
+ public function validate_get_value( $value, $field_type ) {
147
+ if ( $field_type === $this->get_attribute( 'type' ) ) {
148
+ $value = !!$value;
149
+ }
150
+ return $value;
151
+ }
152
+ }
css/settings.css CHANGED
@@ -1,9 +1,9 @@
1
  /**
2
  * settings.css
3
- * Version : 1.0.1
4
  * Author : Takashi Kitajima
5
  * Created : September 23, 2014
6
- * Modified : January 22, 2015
7
  * License : GPLv2
8
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  */
@@ -128,6 +128,7 @@
128
  }
129
  .smart-cf-group .smart-cf-field table th {
130
  font-weight: normal;
 
131
  padding-right: 15px;
132
  text-align: left;
133
  vertical-align: top;
1
  /**
2
  * settings.css
3
+ * Version : 1.0.2
4
  * Author : Takashi Kitajima
5
  * Created : September 23, 2014
6
+ * Modified : April 11, 2015
7
  * License : GPLv2
8
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  */
128
  }
129
  .smart-cf-group .smart-cf-field table th {
130
  font-weight: normal;
131
+ padding-top: 10px;
132
  padding-right: 15px;
133
  text-align: left;
134
  vertical-align: top;
css/wysiwyg.css ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * wysiwyg.css
3
+ * Version : 1.0.0
4
+ * Author : Takashi Kitajima
5
+ * Created : April 11, 2015
6
+ * Modified :
7
+ * License : GPLv2
8
+ * License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
+ */
10
+
11
+ body {
12
+ font-family: "Open Sans", Helvetica, Arial, sans-serif;
13
+ font-size: 13px;
14
+ }
js/editor.js CHANGED
@@ -1,9 +1,9 @@
1
  /**
2
  * editor.js
3
- * Version : 1.0.1
4
  * Author : Takashi Kitajima
5
  * Created : September 23, 2014
6
- * Modified : February 27, 2015
7
  * License : GPLv2
8
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  */
@@ -24,6 +24,13 @@ jQuery( function( $ ) {
24
  $( this ).attr( 'id', 'smart-cf-wysiwyg-' + cnt + i );
25
  var editor_id = $( this ).attr( 'id' );
26
  $( this ).parents( '.wp-editor-wrap' ).find( 'a.add_media' ).attr( 'data-editor', editor_id );
 
 
 
 
 
 
 
27
  tinymce.execCommand( 'mceAddEditor', false, editor_id );
28
  }
29
  } );
1
  /**
2
  * editor.js
3
+ * Version : 1.1.0
4
  * Author : Takashi Kitajima
5
  * Created : September 23, 2014
6
+ * Modified : April 11, 2015
7
  * License : GPLv2
8
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  */
24
  $( this ).attr( 'id', 'smart-cf-wysiwyg-' + cnt + i );
25
  var editor_id = $( this ).attr( 'id' );
26
  $( this ).parents( '.wp-editor-wrap' ).find( 'a.add_media' ).attr( 'data-editor', editor_id );
27
+ tinymce.init( {
28
+ content_css: ['../wp-includes/js/tinymce/skins/wordpress/wp-content.css', '../wp-content/plugins/smart-custom-fields/css/wysiwyg.css'],
29
+ menubar: false,
30
+ plugins: "hr,wplink,fullscreen,wordpress,textcolor,paste,charmap",
31
+ toolbar1: "bold,italic,strikethrough,bullist,numlist,blockquote,hr,alignleft,aligncenter,alignright,link,unlink,wp_more,spellchecker,wp_adv,fullscreen",
32
+ toolbar2: "formatselect,underline,alignjustify,forecolor,pastetext,removeformat,charmap,outdent,indent,undo,redo,wp_help,code"
33
+ } );
34
  tinymce.execCommand( 'mceAddEditor', false, editor_id );
35
  }
36
  } );
languages/smart-custom-fields-ja.mo CHANGED
Binary file
languages/smart-custom-fields-ja.po CHANGED
@@ -2,10 +2,10 @@
2
  # This file is distributed under the same license as the Smart Custom Fields package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Smart Custom Fields 1.3.0\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/smart-custom-fields\n"
7
- "POT-Creation-Date: 2015-03-20 06:46:56+00:00\n"
8
- "PO-Revision-Date: 2015-03-20 15:51+0900\n"
9
  "Last-Translator: Takashi Kitajima <inc@2inc.org>\n"
10
  "Language-Team: \n"
11
  "Language: ja\n"
@@ -18,15 +18,15 @@ msgstr ""
18
  "X-Poedit-Basepath: .\n"
19
  "X-Poedit-SearchPath-0: ..\n"
20
 
21
- #: classes/controller/class.editor.php:60
22
  msgid "Image setting"
23
  msgstr "画像設定"
24
 
25
- #: classes/controller/class.editor.php:61
26
  msgid "File setting"
27
  msgstr "ファイル設定"
28
 
29
- #: classes/controller/class.profile.php:47
30
  #: classes/controller/class.settings.php:76
31
  msgid "Custom Fields"
32
  msgstr "カスタムフィールド"
@@ -72,7 +72,7 @@ msgid "Add Field"
72
  msgstr "フィールド追加"
73
 
74
  #: classes/controller/class.settings.php:212
75
- #: classes/fields/class.field-relation.php:187
76
  msgid "Post Types"
77
  msgstr "投稿タイプ"
78
 
@@ -84,16 +84,19 @@ msgstr "投稿 ID (カンマ区切り)"
84
  msgid "Roles"
85
  msgstr "権限"
86
 
87
- #: classes/fields/class.field-check.php:21
88
- msgid "Check"
89
- msgstr "チェックボックス"
90
 
91
- #: classes/fields/class.field-check.php:81
92
- #: classes/fields/class.field-radio.php:79
93
- #: classes/fields/class.field-select.php:76
94
- msgid "Choices"
95
- msgstr "選択肢"
96
 
 
 
 
 
 
97
  #: classes/fields/class.field-check.php:90
98
  #: classes/fields/class.field-colorpicker.php:102
99
  #: classes/fields/class.field-datepicker.php:124
@@ -105,13 +108,22 @@ msgstr "選択肢"
105
  msgid "Default"
106
  msgstr "デフォルト"
107
 
 
 
 
 
 
 
 
 
 
108
  #: classes/fields/class.field-check.php:99
109
  #: classes/fields/class.field-colorpicker.php:111
110
  #: classes/fields/class.field-datepicker.php:188
111
  #: classes/fields/class.field-file.php:92
112
  #: classes/fields/class.field-image.php:91
113
  #: classes/fields/class.field-radio.php:97
114
- #: classes/fields/class.field-relation.php:208
115
  #: classes/fields/class.field-select.php:94
116
  #: classes/fields/class.field-text.php:74
117
  #: classes/fields/class.field-textarea.php:74
@@ -119,6 +131,16 @@ msgstr "デフォルト"
119
  msgid "Notes"
120
  msgstr "注記"
121
 
 
 
 
 
 
 
 
 
 
 
122
  #: classes/fields/class.field-colorpicker.php:29
123
  msgid "Color picker"
124
  msgstr "カラーピッカー"
@@ -177,7 +199,7 @@ msgstr "ラジオボタン"
177
  msgid "Relation"
178
  msgstr "リレーション"
179
 
180
- #: classes/fields/class.field-relation.php:169
181
  msgid "Load more"
182
  msgstr "さらに読み込む"
183
 
@@ -218,47 +240,48 @@ msgstr "繰り返し"
218
  msgid "Group name"
219
  msgstr "グループ名"
220
 
221
- #: smart-custom-fields.php:123 smart-custom-fields.php:124
222
- #: smart-custom-fields.php:163 smart-custom-fields.php:164
 
 
 
 
 
223
  msgid "Add New"
224
  msgstr "新規追加"
225
 
226
- #: smart-custom-fields.php:125
227
  msgid "New Field"
228
  msgstr "新規フィールド"
229
 
230
- #: smart-custom-fields.php:126
231
  msgid "Edit Field"
232
  msgstr "フィールド編集"
233
 
234
- #: smart-custom-fields.php:127
235
  msgid "View Field"
236
  msgstr "フィールドを表示"
237
 
238
- #: smart-custom-fields.php:128
239
  msgid "All Fields"
240
  msgstr "すべてのフィールド"
241
 
242
- #: smart-custom-fields.php:129
243
  msgid "Search Fields"
244
  msgstr "フィールドを検索"
245
 
246
- #: smart-custom-fields.php:130
247
  msgid "Parent Fields:"
248
  msgstr "親フィールド:"
249
 
250
- #: smart-custom-fields.php:131
251
  msgid "No Fields found."
252
  msgstr "フィールドは見つかりませんでした。"
253
 
254
- #: smart-custom-fields.php:132
255
  msgid "No Fields found in Trash."
256
  msgstr "ゴミ箱にフィールドは見つかりませんでした"
257
 
258
- #. Plugin Name of the plugin/theme
259
- msgid "Smart Custom Fields"
260
- msgstr "Smart Custom Fields"
261
-
262
  #. Plugin URI of the plugin/theme
263
  msgid "https://github.com/inc2734/smart-custom-fields/"
264
  msgstr "https://github.com/inc2734/smart-custom-fields/"
2
  # This file is distributed under the same license as the Smart Custom Fields package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Smart Custom Fields 1.3.1\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/smart-custom-fields\n"
7
+ "POT-Creation-Date: 2015-04-11 05:04:11+00:00\n"
8
+ "PO-Revision-Date: 2015-04-11 14:09+0900\n"
9
  "Last-Translator: Takashi Kitajima <inc@2inc.org>\n"
10
  "Language-Team: \n"
11
  "Language: ja\n"
18
  "X-Poedit-Basepath: .\n"
19
  "X-Poedit-SearchPath-0: ..\n"
20
 
21
+ #: classes/controller/class.editor.php:54
22
  msgid "Image setting"
23
  msgstr "画像設定"
24
 
25
+ #: classes/controller/class.editor.php:55
26
  msgid "File setting"
27
  msgstr "ファイル設定"
28
 
29
+ #: classes/controller/class.profile.php:41
30
  #: classes/controller/class.settings.php:76
31
  msgid "Custom Fields"
32
  msgstr "カスタムフィールド"
72
  msgstr "フィールド追加"
73
 
74
  #: classes/controller/class.settings.php:212
75
+ #: classes/fields/class.field-relation.php:188
76
  msgid "Post Types"
77
  msgstr "投稿タイプ"
78
 
84
  msgid "Roles"
85
  msgstr "権限"
86
 
87
+ #: classes/fields/class.field-boolean.php:24
88
+ msgid "Boolean"
89
+ msgstr "真偽値"
90
 
91
+ #: classes/fields/class.field-boolean.php:38
92
+ msgid "Yes"
93
+ msgstr "はい"
 
 
94
 
95
+ #: classes/fields/class.field-boolean.php:39
96
+ msgid "No"
97
+ msgstr "いいえ"
98
+
99
+ #: classes/fields/class.field-boolean.php:83
100
  #: classes/fields/class.field-check.php:90
101
  #: classes/fields/class.field-colorpicker.php:102
102
  #: classes/fields/class.field-datepicker.php:124
108
  msgid "Default"
109
  msgstr "デフォルト"
110
 
111
+ #: classes/fields/class.field-boolean.php:106
112
+ msgid "TRUE Label"
113
+ msgstr "TRUE ラベル"
114
+
115
+ #: classes/fields/class.field-boolean.php:116
116
+ msgid "FALSE Label"
117
+ msgstr "FALSE ラベル"
118
+
119
+ #: classes/fields/class.field-boolean.php:126
120
  #: classes/fields/class.field-check.php:99
121
  #: classes/fields/class.field-colorpicker.php:111
122
  #: classes/fields/class.field-datepicker.php:188
123
  #: classes/fields/class.field-file.php:92
124
  #: classes/fields/class.field-image.php:91
125
  #: classes/fields/class.field-radio.php:97
126
+ #: classes/fields/class.field-relation.php:209
127
  #: classes/fields/class.field-select.php:94
128
  #: classes/fields/class.field-text.php:74
129
  #: classes/fields/class.field-textarea.php:74
131
  msgid "Notes"
132
  msgstr "注記"
133
 
134
+ #: classes/fields/class.field-check.php:21
135
+ msgid "Check"
136
+ msgstr "チェックボックス"
137
+
138
+ #: classes/fields/class.field-check.php:81
139
+ #: classes/fields/class.field-radio.php:79
140
+ #: classes/fields/class.field-select.php:76
141
+ msgid "Choices"
142
+ msgstr "選択肢"
143
+
144
  #: classes/fields/class.field-colorpicker.php:29
145
  msgid "Color picker"
146
  msgstr "カラーピッカー"
199
  msgid "Relation"
200
  msgstr "リレーション"
201
 
202
+ #: classes/fields/class.field-relation.php:170
203
  msgid "Load more"
204
  msgstr "さらに読み込む"
205
 
240
  msgid "Group name"
241
  msgstr "グループ名"
242
 
243
+ #: classes/models/class.revisions.php:117 smart-custom-fields.php:123
244
+ #: smart-custom-fields.php:124 smart-custom-fields.php:125
245
+ msgid "Smart Custom Fields"
246
+ msgstr "Smart Custom Fields"
247
+
248
+ #: smart-custom-fields.php:126 smart-custom-fields.php:127
249
+ #: smart-custom-fields.php:166 smart-custom-fields.php:167
250
  msgid "Add New"
251
  msgstr "新規追加"
252
 
253
+ #: smart-custom-fields.php:128
254
  msgid "New Field"
255
  msgstr "新規フィールド"
256
 
257
+ #: smart-custom-fields.php:129
258
  msgid "Edit Field"
259
  msgstr "フィールド編集"
260
 
261
+ #: smart-custom-fields.php:130
262
  msgid "View Field"
263
  msgstr "フィールドを表示"
264
 
265
+ #: smart-custom-fields.php:131
266
  msgid "All Fields"
267
  msgstr "すべてのフィールド"
268
 
269
+ #: smart-custom-fields.php:132
270
  msgid "Search Fields"
271
  msgstr "フィールドを検索"
272
 
273
+ #: smart-custom-fields.php:133
274
  msgid "Parent Fields:"
275
  msgstr "親フィールド:"
276
 
277
+ #: smart-custom-fields.php:134
278
  msgid "No Fields found."
279
  msgstr "フィールドは見つかりませんでした。"
280
 
281
+ #: smart-custom-fields.php:135
282
  msgid "No Fields found in Trash."
283
  msgstr "ゴミ箱にフィールドは見つかりませんでした"
284
 
 
 
 
 
285
  #. Plugin URI of the plugin/theme
286
  msgid "https://github.com/inc2734/smart-custom-fields/"
287
  msgstr "https://github.com/inc2734/smart-custom-fields/"
languages/smart-custom-fields.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the Smart Custom Fields package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Smart Custom Fields 1.3.0\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/smart-custom-fields\n"
7
- "POT-Creation-Date: 2015-03-20 06:46:56+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -18,15 +18,15 @@ msgstr ""
18
  "X-Poedit-KeywordsList: __;_e\n"
19
  "X-Poedit-SearchPath-0: ..\n"
20
 
21
- #: classes/controller/class.editor.php:60
22
  msgid "Image setting"
23
  msgstr ""
24
 
25
- #: classes/controller/class.editor.php:61
26
  msgid "File setting"
27
  msgstr ""
28
 
29
- #: classes/controller/class.profile.php:47
30
  #: classes/controller/class.settings.php:76
31
  msgid "Custom Fields"
32
  msgstr ""
@@ -72,7 +72,7 @@ msgid "Add Field"
72
  msgstr ""
73
 
74
  #: classes/controller/class.settings.php:212
75
- #: classes/fields/class.field-relation.php:187
76
  msgid "Post Types"
77
  msgstr ""
78
 
@@ -84,16 +84,19 @@ msgstr ""
84
  msgid "Roles"
85
  msgstr ""
86
 
87
- #: classes/fields/class.field-check.php:21
88
- msgid "Check"
89
  msgstr ""
90
 
91
- #: classes/fields/class.field-check.php:81
92
- #: classes/fields/class.field-radio.php:79
93
- #: classes/fields/class.field-select.php:76
94
- msgid "Choices"
 
 
95
  msgstr ""
96
 
 
97
  #: classes/fields/class.field-check.php:90
98
  #: classes/fields/class.field-colorpicker.php:102
99
  #: classes/fields/class.field-datepicker.php:124
@@ -105,13 +108,22 @@ msgstr ""
105
  msgid "Default"
106
  msgstr ""
107
 
 
 
 
 
 
 
 
 
 
108
  #: classes/fields/class.field-check.php:99
109
  #: classes/fields/class.field-colorpicker.php:111
110
  #: classes/fields/class.field-datepicker.php:188
111
  #: classes/fields/class.field-file.php:92
112
  #: classes/fields/class.field-image.php:91
113
  #: classes/fields/class.field-radio.php:97
114
- #: classes/fields/class.field-relation.php:208
115
  #: classes/fields/class.field-select.php:94
116
  #: classes/fields/class.field-text.php:74
117
  #: classes/fields/class.field-textarea.php:74
@@ -119,6 +131,16 @@ msgstr ""
119
  msgid "Notes"
120
  msgstr ""
121
 
 
 
 
 
 
 
 
 
 
 
122
  #: classes/fields/class.field-colorpicker.php:29
123
  msgid "Color picker"
124
  msgstr ""
@@ -177,7 +199,7 @@ msgstr ""
177
  msgid "Relation"
178
  msgstr ""
179
 
180
- #: classes/fields/class.field-relation.php:169
181
  msgid "Load more"
182
  msgstr ""
183
 
@@ -218,45 +240,47 @@ msgstr ""
218
  msgid "Group name"
219
  msgstr ""
220
 
221
- #: smart-custom-fields.php:123 smart-custom-fields.php:124
222
- #: smart-custom-fields.php:163 smart-custom-fields.php:164
 
 
 
 
 
223
  msgid "Add New"
224
  msgstr ""
225
 
226
- #: smart-custom-fields.php:125
227
  msgid "New Field"
228
  msgstr ""
229
 
230
- #: smart-custom-fields.php:126
231
  msgid "Edit Field"
232
  msgstr ""
233
 
234
- #: smart-custom-fields.php:127
235
  msgid "View Field"
236
  msgstr ""
237
 
238
- #: smart-custom-fields.php:128
239
  msgid "All Fields"
240
  msgstr ""
241
 
242
- #: smart-custom-fields.php:129
243
  msgid "Search Fields"
244
  msgstr ""
245
 
246
- #: smart-custom-fields.php:130
247
  msgid "Parent Fields:"
248
  msgstr ""
249
 
250
- #: smart-custom-fields.php:131
251
  msgid "No Fields found."
252
  msgstr ""
253
 
254
- #: smart-custom-fields.php:132
255
  msgid "No Fields found in Trash."
256
  msgstr ""
257
- #. Plugin Name of the plugin/theme
258
- msgid "Smart Custom Fields"
259
- msgstr ""
260
 
261
  #. Plugin URI of the plugin/theme
262
  msgid "https://github.com/inc2734/smart-custom-fields/"
2
  # This file is distributed under the same license as the Smart Custom Fields package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Smart Custom Fields 1.3.1\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/smart-custom-fields\n"
7
+ "POT-Creation-Date: 2015-04-11 05:04:11+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
18
  "X-Poedit-KeywordsList: __;_e\n"
19
  "X-Poedit-SearchPath-0: ..\n"
20
 
21
+ #: classes/controller/class.editor.php:54
22
  msgid "Image setting"
23
  msgstr ""
24
 
25
+ #: classes/controller/class.editor.php:55
26
  msgid "File setting"
27
  msgstr ""
28
 
29
+ #: classes/controller/class.profile.php:41
30
  #: classes/controller/class.settings.php:76
31
  msgid "Custom Fields"
32
  msgstr ""
72
  msgstr ""
73
 
74
  #: classes/controller/class.settings.php:212
75
+ #: classes/fields/class.field-relation.php:188
76
  msgid "Post Types"
77
  msgstr ""
78
 
84
  msgid "Roles"
85
  msgstr ""
86
 
87
+ #: classes/fields/class.field-boolean.php:24
88
+ msgid "Boolean"
89
  msgstr ""
90
 
91
+ #: classes/fields/class.field-boolean.php:38
92
+ msgid "Yes"
93
+ msgstr ""
94
+
95
+ #: classes/fields/class.field-boolean.php:39
96
+ msgid "No"
97
  msgstr ""
98
 
99
+ #: classes/fields/class.field-boolean.php:83
100
  #: classes/fields/class.field-check.php:90
101
  #: classes/fields/class.field-colorpicker.php:102
102
  #: classes/fields/class.field-datepicker.php:124
108
  msgid "Default"
109
  msgstr ""
110
 
111
+ #: classes/fields/class.field-boolean.php:106
112
+ msgid "TRUE Label"
113
+ msgstr ""
114
+
115
+ #: classes/fields/class.field-boolean.php:116
116
+ msgid "FALSE Label"
117
+ msgstr ""
118
+
119
+ #: classes/fields/class.field-boolean.php:126
120
  #: classes/fields/class.field-check.php:99
121
  #: classes/fields/class.field-colorpicker.php:111
122
  #: classes/fields/class.field-datepicker.php:188
123
  #: classes/fields/class.field-file.php:92
124
  #: classes/fields/class.field-image.php:91
125
  #: classes/fields/class.field-radio.php:97
126
+ #: classes/fields/class.field-relation.php:209
127
  #: classes/fields/class.field-select.php:94
128
  #: classes/fields/class.field-text.php:74
129
  #: classes/fields/class.field-textarea.php:74
131
  msgid "Notes"
132
  msgstr ""
133
 
134
+ #: classes/fields/class.field-check.php:21
135
+ msgid "Check"
136
+ msgstr ""
137
+
138
+ #: classes/fields/class.field-check.php:81
139
+ #: classes/fields/class.field-radio.php:79
140
+ #: classes/fields/class.field-select.php:76
141
+ msgid "Choices"
142
+ msgstr ""
143
+
144
  #: classes/fields/class.field-colorpicker.php:29
145
  msgid "Color picker"
146
  msgstr ""
199
  msgid "Relation"
200
  msgstr ""
201
 
202
+ #: classes/fields/class.field-relation.php:170
203
  msgid "Load more"
204
  msgstr ""
205
 
240
  msgid "Group name"
241
  msgstr ""
242
 
243
+ #: classes/models/class.revisions.php:117 smart-custom-fields.php:123
244
+ #: smart-custom-fields.php:124 smart-custom-fields.php:125
245
+ msgid "Smart Custom Fields"
246
+ msgstr ""
247
+
248
+ #: smart-custom-fields.php:126 smart-custom-fields.php:127
249
+ #: smart-custom-fields.php:166 smart-custom-fields.php:167
250
  msgid "Add New"
251
  msgstr ""
252
 
253
+ #: smart-custom-fields.php:128
254
  msgid "New Field"
255
  msgstr ""
256
 
257
+ #: smart-custom-fields.php:129
258
  msgid "Edit Field"
259
  msgstr ""
260
 
261
+ #: smart-custom-fields.php:130
262
  msgid "View Field"
263
  msgstr ""
264
 
265
+ #: smart-custom-fields.php:131
266
  msgid "All Fields"
267
  msgstr ""
268
 
269
+ #: smart-custom-fields.php:132
270
  msgid "Search Fields"
271
  msgstr ""
272
 
273
+ #: smart-custom-fields.php:133
274
  msgid "Parent Fields:"
275
  msgstr ""
276
 
277
+ #: smart-custom-fields.php:134
278
  msgid "No Fields found."
279
  msgstr ""
280
 
281
+ #: smart-custom-fields.php:135
282
  msgid "No Fields found in Trash."
283
  msgstr ""
 
 
 
284
 
285
  #. Plugin URI of the plugin/theme
286
  msgid "https://github.com/inc2734/smart-custom-fields/"
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.amazon.co.jp/registry/wishlist/39ANKRNSTNW40
4
  Tags: plugin, custom field, custom, field, meta, meta field, repeat, repeatable
5
  Requires at least: 3.9
6
  Tested up to: 4.1.1
7
- Stable tag: 1.3.0
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -81,6 +81,10 @@ You can send your own language pack to me.
81
 
82
  == Changelog ==
83
 
 
 
 
 
84
  = 1.3.0 =
85
  * refactoring.
86
  * Add profile custom fields.
4
  Tags: plugin, custom field, custom, field, meta, meta field, repeat, repeatable
5
  Requires at least: 3.9
6
  Tested up to: 4.1.1
7
+ Stable tag: 1.3.1
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
81
 
82
  == Changelog ==
83
 
84
+ = 1.3.1 =
85
+ * Fixed a wysiwyg field bug.
86
+ * Add boolean field.
87
+
88
  = 1.3.0 =
89
  * refactoring.
90
  * Add profile custom fields.
smart-custom-fields.php CHANGED
@@ -3,11 +3,11 @@
3
  * Plugin name: Smart Custom Fields
4
  * Plugin URI: https://github.com/inc2734/smart-custom-fields/
5
  * Description: Smart Custom Fields is a simple plugin that management custom fields.
6
- * Version: 1.3.0
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created: October 9, 2014
10
- * Modified: March 19, 2015
11
  * Text Domain: smart-custom-fields
12
  * Domain Path: /languages
13
  * License: GPLv2
@@ -25,7 +25,7 @@ class Smart_Custom_Fields {
25
  }
26
 
27
  /**
28
- * 各クラス・翻訳ファイルの読み込み
29
  */
30
  public function plugins_loaded() {
31
  load_plugin_textdomain (
@@ -33,7 +33,14 @@ class Smart_Custom_Fields {
33
  false,
34
  dirname( plugin_basename( __FILE__ ) ) . '/languages'
35
  );
36
-
 
 
 
 
 
 
 
37
  do_action( SCF_Config::PREFIX . 'load' );
38
  require_once plugin_dir_path( __FILE__ ) . 'classes/models/class.meta.php';
39
  require_once plugin_dir_path( __FILE__ ) . 'classes/models/class.setting.php';
3
  * Plugin name: Smart Custom Fields
4
  * Plugin URI: https://github.com/inc2734/smart-custom-fields/
5
  * Description: Smart Custom Fields is a simple plugin that management custom fields.
6
+ * Version: 1.3.1
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created: October 9, 2014
10
+ * Modified: April 11, 2015
11
  * Text Domain: smart-custom-fields
12
  * Domain Path: /languages
13
  * License: GPLv2
25
  }
26
 
27
  /**
28
+ * 翻訳ファイルの読み込み
29
  */
30
  public function plugins_loaded() {
31
  load_plugin_textdomain (
33
  false,
34
  dirname( plugin_basename( __FILE__ ) ) . '/languages'
35
  );
36
+
37
+ add_action( 'after_setup_theme', array( $this, 'after_setup_theme' ) );
38
+ }
39
+
40
+ /**
41
+ * 各クラスの読み込み
42
+ */
43
+ public function after_setup_theme() {
44
  do_action( SCF_Config::PREFIX . 'load' );
45
  require_once plugin_dir_path( __FILE__ ) . 'classes/models/class.meta.php';
46
  require_once plugin_dir_path( __FILE__ ) . 'classes/models/class.setting.php';