Custom Field Template - Version 0.9

Version Description

Download this release

Release Info

Developer Hiroaki Miyashita
Plugin Icon 128x128 Custom Field Template
Version 0.9
Comparing to
See all releases

Code changes from version 0.8 to 0.9

custom-field-template-ja.mo CHANGED
Binary file
custom-field-template-ja.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Custom Field Template\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2009-01-09 21:06+0900\n"
6
- "PO-Revision-Date: 2009-01-09 21:07+0900\n"
7
  "Last-Translator: \n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
@@ -16,177 +16,189 @@ msgstr ""
16
  "X-Poedit-Basepath: ../\n"
17
  "X-Poedit-SearchPath-0: custom-field-template\n"
18
 
19
- #: custom-field-template/custom-field-template.php:83
20
- #: custom-field-template/custom-field-template.php:84
21
- #: custom-field-template/custom-field-template.php:178
22
- #: custom-field-template/custom-field-template.php:235
23
- #: custom-field-template/custom-field-template.php:824
 
 
 
 
 
 
 
 
 
 
 
 
24
  msgid "Custom Field Template"
25
  msgstr "カスタムフィールドテンプレート"
26
 
27
- #: custom-field-template/custom-field-template.php:95
28
  msgid "Settings"
29
  msgstr "設定"
30
 
31
- #: custom-field-template/custom-field-template.php:106
32
  msgid "Default Template"
33
  msgstr "デフォルトテンプレート"
34
 
35
- #: custom-field-template/custom-field-template.php:198
36
- #: custom-field-template/custom-field-template.php:202
37
- #: custom-field-template/custom-field-template.php:210
38
- #: custom-field-template/custom-field-template.php:218
39
  msgid "Options updated."
40
  msgstr "オプションは更新されました。"
41
 
42
- #: custom-field-template/custom-field-template.php:223
43
  msgid "Options resetted."
44
  msgstr "オプションはリセットされました。"
45
 
46
- #: custom-field-template/custom-field-template.php:227
47
  msgid "Options deleted."
48
  msgstr "オプションは削除されました。"
49
 
50
- #: custom-field-template/custom-field-template.php:241
51
  msgid "Custom Field Template Options"
52
  msgstr "カスタムフィールドテンプレートオプション"
53
 
54
- #: custom-field-template/custom-field-template.php:251
55
  #, php-format
56
  msgid "Template Title %d"
57
  msgstr "テンプレートタイトル %d"
58
 
59
- #: custom-field-template/custom-field-template.php:253
60
  #, php-format
61
  msgid "Template Instruction %d"
62
  msgstr "テンプレートインストラクション %d"
63
 
64
- #: custom-field-template/custom-field-template.php:255
65
  #, php-format
66
  msgid "Template Content %d"
67
  msgstr "テンプレートコンテンツ %d"
68
 
69
- #: custom-field-template/custom-field-template.php:262
70
  msgid "In case that you would like to insert multiple images at once in use of the custom field media buttons"
71
  msgstr "カスタムフィールへの画像挿入を一度に複数枚実行する場合"
72
 
73
- #: custom-field-template/custom-field-template.php:263
74
  msgid "Use multiple image inset"
75
  msgstr "複数画像挿入を利用する"
76
 
77
- #: custom-field-template/custom-field-template.php:263
78
  msgid "Caution:"
79
  msgstr "ご注意:"
80
 
81
- #: custom-field-template/custom-field-template.php:263
82
  msgid "You need to edit `wp-admin/includes/media.php`. Delete or comment out the code in the function media_send_to_editor."
83
  msgstr "`wp-admin/includes/media.php`を編集する必要があります。media_send_to_editor関数の中身を削除するかコメントアウトしてください。"
84
 
85
- #: custom-field-template/custom-field-template.php:267
86
  msgid "In case that you would like to replace custom keys by labels if `label` is set"
87
  msgstr "`label`がセットされていて、カスタムフィールドのキーの代わりにラベルを表示したい場合"
88
 
89
- #: custom-field-template/custom-field-template.php:268
90
  msgid "Use labels in place of custom keys"
91
  msgstr "カスタムフィールドのキーの代わりにラベルを使用する"
92
 
93
- #: custom-field-template/custom-field-template.php:271
94
  msgid "In case that you would like to add p and br tags in textareas automatically"
95
  msgstr "テキストエリアでpタグ、brタグを自動的に追加したい場合"
96
 
97
- #: custom-field-template/custom-field-template.php:272
98
  msgid "Use wpautop function"
99
  msgstr "wpautop関数を使用する"
100
 
101
- #: custom-field-template/custom-field-template.php:276
102
- #: custom-field-template/custom-field-template.php:295
103
- #: custom-field-template/custom-field-template.php:322
104
- #: custom-field-template/custom-field-template.php:350
105
  msgid "Update Options »"
106
  msgstr "オプションを更新する »"
107
 
108
- #: custom-field-template/custom-field-template.php:285
109
- #: custom-field-template/custom-field-template.php:304
110
- #: custom-field-template/custom-field-template.php:331
111
- #: custom-field-template/custom-field-template.php:359
112
- #: custom-field-template/custom-field-template.php:431
113
- #: custom-field-template/custom-field-template.php:447
114
  msgid "Click to toggle"
115
  msgstr "クリックで切替"
116
 
117
- #: custom-field-template/custom-field-template.php:286
118
  msgid "CSS"
119
  msgstr "CSS"
120
 
121
- #: custom-field-template/custom-field-template.php:305
122
  msgid "[cft] Shortcode Format"
123
  msgstr "[cft] Shortcode Format"
124
 
125
- #: custom-field-template/custom-field-template.php:308
126
  msgid "[key] will be converted into the value of [key]."
127
  msgstr "[key]は、[key]の値に置換されます。"
128
 
129
- #: custom-field-template/custom-field-template.php:332
130
  msgid "PHP CODE (Experimental Option)"
131
  msgstr "PHP CODE (Experimental Option)"
132
 
133
- #: custom-field-template/custom-field-template.php:334
134
  msgid "Are you sure to save PHP codes? Please do it at your own risk."
135
  msgstr "PHPコードを保存してよろしいですか?自己責任で実行してください。"
136
 
137
- #: custom-field-template/custom-field-template.php:335
138
  msgid "This option is available only for `radio` and `select` types. You must set $values as an array."
139
  msgstr "このオプションは`radio`と`select`のtypeで有効です。配列として$valuesをセットしなければいけません。"
140
 
141
- #: custom-field-template/custom-field-template.php:360
142
  msgid "Option List"
143
  msgstr "オプションリスト"
144
 
145
- #: custom-field-template/custom-field-template.php:432
146
  msgid "Reset Options"
147
  msgstr "オプションをリセットする"
148
 
149
- #: custom-field-template/custom-field-template.php:434
150
  msgid "Are you sure to reset options? Options you set will be reset to the default settings."
151
  msgstr "本当にオプションをリセットしてもよろしいですか?設定したオプションはデフォルトの状態に戻ります。"
152
 
153
- #: custom-field-template/custom-field-template.php:438
154
  msgid "Unset Options »"
155
  msgstr "オプションをリセットする »"
156
 
157
- #: custom-field-template/custom-field-template.php:448
158
  msgid "Delete Options"
159
  msgstr "オプションを削除する"
160
 
161
- #: custom-field-template/custom-field-template.php:450
162
  msgid "Are you sure to delete options? Options you set will be deleted."
163
  msgstr "本当にオプションを削除してもよろしいですか?設定したオプションは削除されます。"
164
 
165
- #: custom-field-template/custom-field-template.php:454
166
  msgid "Delete Options »"
167
  msgstr "オプションを削除する »"
168
 
169
- #: custom-field-template/custom-field-template.php:597
170
  msgid "Clear"
171
  msgstr "解除"
172
 
173
- #: custom-field-template/custom-field-template.php:712
174
  msgid "Add Media"
175
  msgstr ""
176
 
177
- #: custom-field-template/custom-field-template.php:714
178
  msgid "Add an Image"
179
  msgstr ""
180
 
181
- #: custom-field-template/custom-field-template.php:716
182
  msgid "Add Video"
183
  msgstr ""
184
 
185
- #: custom-field-template/custom-field-template.php:718
186
  msgid "Add Audio"
187
  msgstr ""
188
 
189
- #: custom-field-template/custom-field-template.php:729
190
  msgid "Toggle"
191
  msgstr "切り替え"
192
 
2
  msgstr ""
3
  "Project-Id-Version: Custom Field Template\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2009-01-14 02:28+0900\n"
6
+ "PO-Revision-Date: 2009-01-14 02:28+0900\n"
7
  "Last-Translator: \n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
16
  "X-Poedit-Basepath: ../\n"
17
  "X-Poedit-SearchPath-0: custom-field-template\n"
18
 
19
+ #: custom-field-template/custom-field-template.php:41
20
+ msgid "read more"
21
+ msgstr "続きを表示"
22
+
23
+ #: custom-field-template/custom-field-template.php:77
24
+ msgid "Quick Edit"
25
+ msgstr "クイック編集"
26
+
27
+ #: custom-field-template/custom-field-template.php:88
28
+ msgid "Custom Fields"
29
+ msgstr "カスタムフィールド"
30
+
31
+ #: custom-field-template/custom-field-template.php:147
32
+ #: custom-field-template/custom-field-template.php:148
33
+ #: custom-field-template/custom-field-template.php:243
34
+ #: custom-field-template/custom-field-template.php:300
35
+ #: custom-field-template/custom-field-template.php:892
36
  msgid "Custom Field Template"
37
  msgstr "カスタムフィールドテンプレート"
38
 
39
+ #: custom-field-template/custom-field-template.php:159
40
  msgid "Settings"
41
  msgstr "設定"
42
 
43
+ #: custom-field-template/custom-field-template.php:171
44
  msgid "Default Template"
45
  msgstr "デフォルトテンプレート"
46
 
47
+ #: custom-field-template/custom-field-template.php:263
48
+ #: custom-field-template/custom-field-template.php:267
49
+ #: custom-field-template/custom-field-template.php:275
50
+ #: custom-field-template/custom-field-template.php:283
51
  msgid "Options updated."
52
  msgstr "オプションは更新されました。"
53
 
54
+ #: custom-field-template/custom-field-template.php:288
55
  msgid "Options resetted."
56
  msgstr "オプションはリセットされました。"
57
 
58
+ #: custom-field-template/custom-field-template.php:292
59
  msgid "Options deleted."
60
  msgstr "オプションは削除されました。"
61
 
62
+ #: custom-field-template/custom-field-template.php:306
63
  msgid "Custom Field Template Options"
64
  msgstr "カスタムフィールドテンプレートオプション"
65
 
66
+ #: custom-field-template/custom-field-template.php:316
67
  #, php-format
68
  msgid "Template Title %d"
69
  msgstr "テンプレートタイトル %d"
70
 
71
+ #: custom-field-template/custom-field-template.php:318
72
  #, php-format
73
  msgid "Template Instruction %d"
74
  msgstr "テンプレートインストラクション %d"
75
 
76
+ #: custom-field-template/custom-field-template.php:320
77
  #, php-format
78
  msgid "Template Content %d"
79
  msgstr "テンプレートコンテンツ %d"
80
 
81
+ #: custom-field-template/custom-field-template.php:327
82
  msgid "In case that you would like to insert multiple images at once in use of the custom field media buttons"
83
  msgstr "カスタムフィールへの画像挿入を一度に複数枚実行する場合"
84
 
85
+ #: custom-field-template/custom-field-template.php:328
86
  msgid "Use multiple image inset"
87
  msgstr "複数画像挿入を利用する"
88
 
89
+ #: custom-field-template/custom-field-template.php:328
90
  msgid "Caution:"
91
  msgstr "ご注意:"
92
 
93
+ #: custom-field-template/custom-field-template.php:328
94
  msgid "You need to edit `wp-admin/includes/media.php`. Delete or comment out the code in the function media_send_to_editor."
95
  msgstr "`wp-admin/includes/media.php`を編集する必要があります。media_send_to_editor関数の中身を削除するかコメントアウトしてください。"
96
 
97
+ #: custom-field-template/custom-field-template.php:332
98
  msgid "In case that you would like to replace custom keys by labels if `label` is set"
99
  msgstr "`label`がセットされていて、カスタムフィールドのキーの代わりにラベルを表示したい場合"
100
 
101
+ #: custom-field-template/custom-field-template.php:333
102
  msgid "Use labels in place of custom keys"
103
  msgstr "カスタムフィールドのキーの代わりにラベルを使用する"
104
 
105
+ #: custom-field-template/custom-field-template.php:336
106
  msgid "In case that you would like to add p and br tags in textareas automatically"
107
  msgstr "テキストエリアでpタグ、brタグを自動的に追加したい場合"
108
 
109
+ #: custom-field-template/custom-field-template.php:337
110
  msgid "Use wpautop function"
111
  msgstr "wpautop関数を使用する"
112
 
113
+ #: custom-field-template/custom-field-template.php:341
114
+ #: custom-field-template/custom-field-template.php:360
115
+ #: custom-field-template/custom-field-template.php:387
116
+ #: custom-field-template/custom-field-template.php:415
117
  msgid "Update Options »"
118
  msgstr "オプションを更新する »"
119
 
120
+ #: custom-field-template/custom-field-template.php:350
121
+ #: custom-field-template/custom-field-template.php:369
122
+ #: custom-field-template/custom-field-template.php:396
123
+ #: custom-field-template/custom-field-template.php:424
124
+ #: custom-field-template/custom-field-template.php:499
125
+ #: custom-field-template/custom-field-template.php:515
126
  msgid "Click to toggle"
127
  msgstr "クリックで切替"
128
 
129
+ #: custom-field-template/custom-field-template.php:351
130
  msgid "CSS"
131
  msgstr "CSS"
132
 
133
+ #: custom-field-template/custom-field-template.php:370
134
  msgid "[cft] Shortcode Format"
135
  msgstr "[cft] Shortcode Format"
136
 
137
+ #: custom-field-template/custom-field-template.php:373
138
  msgid "[key] will be converted into the value of [key]."
139
  msgstr "[key]は、[key]の値に置換されます。"
140
 
141
+ #: custom-field-template/custom-field-template.php:397
142
  msgid "PHP CODE (Experimental Option)"
143
  msgstr "PHP CODE (Experimental Option)"
144
 
145
+ #: custom-field-template/custom-field-template.php:399
146
  msgid "Are you sure to save PHP codes? Please do it at your own risk."
147
  msgstr "PHPコードを保存してよろしいですか?自己責任で実行してください。"
148
 
149
+ #: custom-field-template/custom-field-template.php:400
150
  msgid "This option is available only for `radio` and `select` types. You must set $values as an array."
151
  msgstr "このオプションは`radio`と`select`のtypeで有効です。配列として$valuesをセットしなければいけません。"
152
 
153
+ #: custom-field-template/custom-field-template.php:425
154
  msgid "Option List"
155
  msgstr "オプションリスト"
156
 
157
+ #: custom-field-template/custom-field-template.php:500
158
  msgid "Reset Options"
159
  msgstr "オプションをリセットする"
160
 
161
+ #: custom-field-template/custom-field-template.php:502
162
  msgid "Are you sure to reset options? Options you set will be reset to the default settings."
163
  msgstr "本当にオプションをリセットしてもよろしいですか?設定したオプションはデフォルトの状態に戻ります。"
164
 
165
+ #: custom-field-template/custom-field-template.php:506
166
  msgid "Unset Options »"
167
  msgstr "オプションをリセットする »"
168
 
169
+ #: custom-field-template/custom-field-template.php:516
170
  msgid "Delete Options"
171
  msgstr "オプションを削除する"
172
 
173
+ #: custom-field-template/custom-field-template.php:518
174
  msgid "Are you sure to delete options? Options you set will be deleted."
175
  msgstr "本当にオプションを削除してもよろしいですか?設定したオプションは削除されます。"
176
 
177
+ #: custom-field-template/custom-field-template.php:522
178
  msgid "Delete Options »"
179
  msgstr "オプションを削除する »"
180
 
181
+ #: custom-field-template/custom-field-template.php:665
182
  msgid "Clear"
183
  msgstr "解除"
184
 
185
+ #: custom-field-template/custom-field-template.php:780
186
  msgid "Add Media"
187
  msgstr ""
188
 
189
+ #: custom-field-template/custom-field-template.php:782
190
  msgid "Add an Image"
191
  msgstr ""
192
 
193
+ #: custom-field-template/custom-field-template.php:784
194
  msgid "Add Video"
195
  msgstr ""
196
 
197
+ #: custom-field-template/custom-field-template.php:786
198
  msgid "Add Audio"
199
  msgstr ""
200
 
201
+ #: custom-field-template/custom-field-template.php:797
202
  msgid "Toggle"
203
  msgstr "切り替え"
204
 
custom-field-template.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Custom Field Template
4
  Plugin URI: http://wordpressgogo.com/development/custom-field-template.html
5
  Description: This plugin adds the default custom fields on the Write Post/Page.
6
  Author: Hiroaki Miyashita
7
- Version: 0.8
8
  Author URI: http://wordpressgogo.com/
9
  */
10
 
@@ -19,37 +19,19 @@ class custom_field_template {
19
  add_action( 'init', array(&$this, 'custom_field_template_init') );
20
  add_action( 'admin_menu', array(&$this, 'custom_field_template_admin_menu') );
21
  add_action( 'admin_print_scripts', array(&$this, 'custom_field_template_admin_scripts') );
 
22
 
23
  add_action( 'edit_post', array(&$this, 'edit_meta_value'), 100 );
24
  add_action( 'save_post', array(&$this, 'edit_meta_value'), 100 );
25
  add_action( 'publish_post', array(&$this, 'edit_meta_value'), 100 );
26
-
27
  add_filter( 'media_send_to_editor', array(&$this, 'media_send_to_custom_field'), 15 );
28
- add_filter( 'plugin_action_links', array(&$this, 'wpaq_filter_plugin_actions'), 10, 2);
29
 
30
  if ( function_exists('add_shortcode') )
31
  add_shortcode( 'cft', array(&$this, 'output_custom_field_values') );
32
  }
33
-
34
- function media_send_to_custom_field($html) {
35
- $options = $this->get_custom_field_template_data();
36
-
37
- $out = '<script type="text/javascript">' . "\n" .
38
- ' /* <![CDATA[ */' . "\n" .
39
- ' var win = window.dialogArguments || opener || parent || top;' . "\n" .
40
- ' win.send_to_custom_field("' . addslashes($html) . '");' . "\n" .
41
- '/* ]]> */' . "\n" .
42
- '</script>' . "\n";
43
-
44
- echo $out;
45
-
46
- if ($options['custom_field_template_use_multiple_insert']) {
47
- return;
48
- } else {
49
- exit();
50
- }
51
- }
52
-
53
  function custom_field_template_init() {
54
  global $wp_version;
55
 
@@ -61,6 +43,12 @@ class custom_field_template {
61
  }
62
  }
63
 
 
 
 
 
 
 
64
  if ( is_user_logged_in() && isset($_REQUEST['id']) && $_REQUEST['page'] == 'custom-field-template/custom-field-template.php' ) {
65
  echo $this->load_custom_field( $_REQUEST['id'] );
66
  exit();
@@ -74,6 +62,14 @@ class custom_field_template {
74
  }
75
  }
76
 
 
 
 
 
 
 
 
 
77
  if ( substr($wp_version, 0, 3) < '2.5' ) {
78
  add_action( 'simple_edit_form', array(&$this, 'insert_custom_field'), 1 );
79
  add_action( 'edit_form_advanced', array(&$this, 'insert_custom_field'), 1 );
@@ -86,6 +82,241 @@ class custom_field_template {
86
 
87
  }
88
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  function wpaq_filter_plugin_actions($links, $file){
90
  static $this_plugin;
91
 
@@ -99,7 +330,7 @@ class custom_field_template {
99
  }
100
 
101
  function custom_field_template_admin_scripts() {
102
- wp_enqueue_script( 'jquery');
103
  }
104
 
105
  function install_custom_field_template_data() {
@@ -365,7 +596,7 @@ type = textfield<br />
365
  size = 35<br />
366
  hideKey = true<br />
367
 
368
- <table class="form-table" style="margin-bottom:5px;">
369
  <thead>
370
  <tr>
371
  <th>type</th><th>text or textfield</th><th>checkbox</th><th>radio</th><th>select</th><th>textarea</th>
@@ -422,6 +653,9 @@ hideKey = true<br />
422
  <tr>
423
  <th>blank</th><td>blank = true</td><td>blank = true</td><td>blank = true</td><td>blank = true</td><td>blank = true</td>
424
  </tr>
 
 
 
425
  </tbody>
426
  </table>
427
  </div>
@@ -691,7 +925,7 @@ jQuery(this).addClass("closed");
691
  }
692
 
693
  $rand = rand();
694
-
695
  if( $tinyMCE == true ) {
696
  $out = '<script type="text/javascript">' . "\n" .
697
  '// <![CDATA[' . "\n" .
@@ -707,6 +941,8 @@ jQuery(this).addClass("closed");
707
 
708
  if ( substr($wp_version, 0, 3) >= '2.5' ) {
709
 
 
 
710
  if ( $mediaButton == true ) {
711
  $media_upload_iframe_src = "media-upload.php";
712
  $media_title = __('Add Media');
@@ -729,7 +965,8 @@ EOF;
729
  $switch .= '<a href="#toggle" onclick="switchMode(\''.$name.$rand.'\'); return false;">' . __('Toggle', 'custom-field-template') . '</a>';
730
  }
731
  $switch .= '</div>';
732
-
 
733
  }
734
 
735
  if ( $hideKey == true ) $hide = ' class="hideKey"';
@@ -1117,32 +1354,38 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1117
  ), $attr));
1118
 
1119
  if ( is_numeric($format) && $output = $options['shortcode_format'][$format] ) :
1120
- $fields = get_post_custom($post_id);
1121
 
1122
- if( $fields == null)
1123
  return;
1124
-
1125
- foreach ( $fields as $key => $val ) :
1126
- if ( count($val) > 1 ) :
1127
- $replace_val = '<ul>';
1128
- foreach ( $val as $val2 ) :
1129
- $replace_val .= '<li>'.$val2.'</li>';
1130
- endforeach;
1131
- $replace_val .= '</ul>';
1132
- else :
1133
- $replace_val = $val[0];
1134
- endif;
1135
-
1136
- $output = preg_replace('/\['.$key.'\]/', $replace_val, $output);
1137
- endforeach;
1138
 
1139
- $fields = $this->get_custom_fields( $template );
1140
- foreach ( $fields as $key => $val ) :
1141
- $output = preg_replace('/\['.$key.'\]/', '', $output);
1142
- endforeach;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1143
  else :
1144
  $fields = $this->get_custom_fields( $template );
1145
-
1146
  if( $fields == null)
1147
  return;
1148
 
@@ -1150,6 +1393,10 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1150
  foreach ( $fields as $key => $val ) :
1151
  $value = get_post_meta( $post_id, $key );
1152
  if ($value):
 
 
 
 
1153
  foreach ( $val as $key2 => $val2 ) :
1154
  $hide = '';
1155
  if ( $val2['output'] == true ) :
@@ -1159,7 +1406,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
1159
  if ( $val2['type'] == 'checkbox' ) :
1160
  if( in_array($val2['value'], $value) ) :
1161
  $output .= '<dt><span' . $hide . '>' . $key . '</span></dt>' . "\n";
1162
- $output .= '<dd>' . $val2['value'] . '</dd>' . "\n";
1163
  endif;
1164
  else :
1165
  $output .= '<dt><span' . $hide . '>' . $key . '</span></dt>' . "\n";
4
  Plugin URI: http://wordpressgogo.com/development/custom-field-template.html
5
  Description: This plugin adds the default custom fields on the Write Post/Page.
6
  Author: Hiroaki Miyashita
7
+ Version: 0.9
8
  Author URI: http://wordpressgogo.com/
9
  */
10
 
19
  add_action( 'init', array(&$this, 'custom_field_template_init') );
20
  add_action( 'admin_menu', array(&$this, 'custom_field_template_admin_menu') );
21
  add_action( 'admin_print_scripts', array(&$this, 'custom_field_template_admin_scripts') );
22
+ add_action( 'admin_head', array(&$this, 'custom_field_template_admin_head'), 100 );
23
 
24
  add_action( 'edit_post', array(&$this, 'edit_meta_value'), 100 );
25
  add_action( 'save_post', array(&$this, 'edit_meta_value'), 100 );
26
  add_action( 'publish_post', array(&$this, 'edit_meta_value'), 100 );
27
+
28
  add_filter( 'media_send_to_editor', array(&$this, 'media_send_to_custom_field'), 15 );
29
+ add_filter( 'plugin_action_links', array(&$this, 'wpaq_filter_plugin_actions'), 10, 2 );
30
 
31
  if ( function_exists('add_shortcode') )
32
  add_shortcode( 'cft', array(&$this, 'output_custom_field_values') );
33
  }
34
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  function custom_field_template_init() {
36
  global $wp_version;
37
 
43
  }
44
  }
45
 
46
+ if ( is_user_logged_in() && isset($_REQUEST['id']) && $_REQUEST['page'] == 'custom-field-template/custom-field-template.php' && $_REQUEST['cft_mode'] == 'ajax' ) {
47
+ $this->edit_meta_value();
48
+ exit();
49
+ }
50
+
51
+
52
  if ( is_user_logged_in() && isset($_REQUEST['id']) && $_REQUEST['page'] == 'custom-field-template/custom-field-template.php' ) {
53
  echo $this->load_custom_field( $_REQUEST['id'] );
54
  exit();
62
  }
63
  }
64
 
65
+ if ( substr($wp_version, 0, 3) >= '2.7' ) {
66
+ add_action( 'manage_posts_custom_column', array(&$this, 'add_manage_posts_custom_column'), 10, 2 );
67
+ add_filter( 'manage_posts_columns', array(&$this, 'add_manage_posts_columns') );
68
+ add_action( 'manage_pages_custom_column', array(&$this, 'add_manage_posts_custom_column'), 10, 2 );
69
+ add_filter( 'manage_pages_columns', array(&$this, 'add_manage_pages_columns') );
70
+ add_action( 'quick_edit_custom_box', array(&$this, 'add_quick_edit_custom_box'), 10, 2 );
71
+ }
72
+
73
  if ( substr($wp_version, 0, 3) < '2.5' ) {
74
  add_action( 'simple_edit_form', array(&$this, 'insert_custom_field'), 1 );
75
  add_action( 'edit_form_advanced', array(&$this, 'insert_custom_field'), 1 );
82
 
83
  }
84
 
85
+ function add_quick_edit_custom_box($column_name, $type) {
86
+ global $wp_version;
87
+ $options = $this->get_custom_field_template_data();
88
+
89
+ if( $options == null)
90
+ return;
91
+
92
+ if ( !$options['css'] ) {
93
+ $this->install_custom_field_template_css();
94
+ $options = $this->get_custom_field_template_data();
95
+ }
96
+
97
+ $out .= '<fieldset style="clear:both;">' . "\n";
98
+ $out .= '<div class="inline-edit-group">';
99
+ $out .= '<style type="text/css">' . "\n" .
100
+ '<!--' . "\n";
101
+ $out .= $options['css'] . "\n";
102
+ $out .= '-->' . "\n" .
103
+ '</style>';
104
+
105
+ if ( count($options['custom_fields'])>1 ) {
106
+ $out .= '<select id="custom_field_template_select" onchange="jQuery.ajax({type: \'GET\', url: \'?page=custom-field-template/custom-field-template.php&id=\'+jQuery(this).val()+\'&post=\'+jQuery(this).parent().parent().parent().parent().attr(\'id\').replace(\'edit-\',\'\'), success: function(html) {jQuery(\'#cft\').html(html);}});">';
107
+ for ( $i=0; $i < count($options['custom_fields']); $i++ ) {
108
+ if ( $i == $options['posts'][$_REQUEST['post']] ) {
109
+ $out .= '<option value="' . $i . '" selected="selected">' . stripcslashes($options['custom_fields'][$i]['title']) . '</option>';
110
+ } else
111
+ $out .= '<option value="' . $i . '">' . stripcslashes($options['custom_fields'][$i]['title']) . '</option>';
112
+ }
113
+ $out .= '</select>';
114
+ }
115
+
116
+ $out .= '<input type="hidden" name="custom-field-template-verify-key" id="custom-field-template-verify-key" value="' . wp_create_nonce('custom-field-template') . '" />';
117
+ $out .= '<div id="cft">';
118
+ $out .= '</div>';
119
+
120
+ $out .= '</div>' . "\n";
121
+ $out .= '</fieldset>' . "\n";
122
+
123
+ echo $out;
124
+ }
125
+
126
+ function custom_field_template_admin_head() {
127
+ global $wp_version;
128
+
129
+ if ( substr($wp_version, 0, 3) >= '2.7' && is_user_logged_in() && ( strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit-pages.php') ) ) {
130
+ ?>
131
+ <script type="text/javascript">
132
+ // <![CDATA[
133
+ jQuery(document).ready(function() {
134
+ jQuery('.hide-if-no-js-cft').show();
135
+ jQuery('.hide-if-js-cft').hide();
136
+
137
+ inlineEditPost.addEvents = function(r) {
138
+ r.each(function() {
139
+ var row = jQuery(this);
140
+ jQuery('a.editinline', row).click(function() {
141
+ inlineEditPost.edit(this);
142
+ post_id = jQuery(this).parent().parent().parent().parent().attr('id').replace('post-','');
143
+ inlineEditPost.cft_load(post_id);
144
+ return false;
145
+ });
146
+ });
147
+ }
148
+
149
+ inlineEditPost.save = function(id) {
150
+ if( typeof(id) == 'object' )
151
+ id = this.getId(id);
152
+
153
+ jQuery('table.widefat .inline-edit-save .waiting').show();
154
+
155
+ var params = {
156
+ action: 'inline-save',
157
+ post_type: this.type,
158
+ post_ID: id,
159
+ edit_date: 'true'
160
+ };
161
+
162
+ var fields = jQuery('#edit-'+id+' :input').fieldSerialize();
163
+ params = fields + '&' + jQuery.param(params);
164
+
165
+ // make ajax request
166
+ jQuery.post('admin-ajax.php', params,
167
+ function(r) {
168
+ jQuery('table.widefat .inline-edit-save .waiting').hide();
169
+
170
+ if (r) {
171
+ if ( -1 != r.indexOf('<tr') ) {
172
+ jQuery(inlineEditPost.what+id).remove();
173
+ jQuery('#edit-'+id).before(r).remove();
174
+
175
+ var row = jQuery(inlineEditPost.what+id);
176
+ row.hide();
177
+
178
+ if ( 'draft' == jQuery('input[name="post_status"]').val() )
179
+ row.find('td.column-comments').hide();
180
+
181
+ row.find('.hide-if-no-js').removeClass('hide-if-no-js');
182
+ jQuery('.hide-if-no-js-cft').show();
183
+ jQuery('.hide-if-js-cft').hide();
184
+
185
+ inlineEditPost.addEvents(row);
186
+ row.fadeIn();
187
+ } else {
188
+ r = r.replace( /<.[^<>]*?>/g, '' );
189
+ jQuery('#edit-'+id+' .inline-edit-save').append('<span class="error">'+r+'</span>');
190
+ }
191
+ } else {
192
+ jQuery('#edit-'+id+' .inline-edit-save').append('<span class="error">'+inlineEditL10n.error+'</span>');
193
+ }
194
+ }
195
+ , 'html');
196
+ return false;
197
+ }
198
+
199
+ jQuery('.editinline').click(function () {post_id = jQuery(this).parent().parent().parent().parent().attr('id').replace('post-',''); inlineEditPost.cft_load(post_id);});
200
+ inlineEditPost.cft_load = function (post_id) {
201
+ jQuery.ajax({type: 'GET', url: '?page=custom-field-template/custom-field-template.php&id=0&post='+post_id, success: function(html) {jQuery('#cft').html(html);}});
202
+ };
203
+
204
+ jQuery('.save').click(function () {post_id = jQuery(this).parent().parent().parent().attr('id').replace('edit-',''); inlineEditPost.cft_save(post_id);});
205
+ inlineEditPost.cft_save = function (post_id) {
206
+ var fields = jQuery('#edit-'+post_id+' #cft :input').fieldSerialize();
207
+ jQuery.ajax({type: 'POST', url: '?page=custom-field-template/custom-field-template.php&cft_mode=ajax&post='+post_id+'&'+fields});
208
+ };
209
+
210
+ });
211
+ //-->
212
+ </script>
213
+ <style type="text/css">
214
+ <!--
215
+ div.cft_list p.key { font-weight:bold; margin: 0; }
216
+ div.cft_list p.value { margin: 0 0 0 10px; }
217
+ .cft-actions { visibility: hidden; padding: 2px 0 0; }
218
+ tr:hover .cft-actions { visibility: visible; }
219
+ .inline-edit-row fieldset label { display:inline; }
220
+ -->
221
+ </style>
222
+ <?php
223
+ }
224
+ }
225
+
226
+ function add_manage_posts_custom_column($column_name, $post_id) {
227
+ $data = get_post_custom($post_id);
228
+
229
+ if( is_array($data) ) :
230
+ $flag = 0;
231
+ foreach($data as $key => $val) :
232
+ if ( substr($key, 0, 1) == '_' || !$val[0] ) continue;
233
+ $content .= '<p class="key">' . $key . '</p>' . "\n";
234
+ foreach($val as $val2) :
235
+ $val2 = htmlspecialchars($val2, ENT_QUOTES);
236
+ if ( $flag ) :
237
+ $content .= '<p class="value">' . $val2 . '</p>' . "\n";
238
+ else :
239
+ if ( function_exists( mb_strlen ) ) :
240
+ if ( mb_strlen($val2) > 50 ) :
241
+ $before_content = mb_substr($val2, 0, 50);
242
+ $after_content = mb_substr($val2, 50);
243
+ $content .= '<p class="value">' . $before_content . '[[[break]]]' . '<p class="value">' . $after_content . '</p>' . "\n";
244
+ $flag = 1;
245
+ else :
246
+ $content .= '<p class="value">' . $val2 . '</p>' . "\n";
247
+ endif;
248
+ else :
249
+ if ( strlen($val2) > 50 ) :
250
+ $before_content = substr($val2, 0, 50);
251
+ $after_content = substr($val2, 50);
252
+ $content .= '<p class="value">' . $before_content . '[[[break]]]' . '<p class="value">' . $after_content . '</p>' . "\n";
253
+ $flag = 1;
254
+ else :
255
+ $content .= '<p class="value">' . $val2 . '</p>' . "\n";
256
+ endif;
257
+ endif;
258
+ endif;
259
+ endforeach;
260
+ endforeach;
261
+ if ( $content ) :
262
+ $content = preg_replace('/([^\n]+)\n([^\n]+)\n([^\n]+)\n([^\n]+)\n([^$]+)/', '\1\2\3\4[[[break]]]\5', $content);
263
+ list($before, $after) = explode('[[[break]]]', $content, 2);
264
+ $after = preg_replace('/\[\[\[break\]\]\]/', '', $after);
265
+ $output .= '<div class="cft_list">';
266
+ $output .= balanceTags($before, true);
267
+ if ( $after ) :
268
+ $output .= '<span class="hide-if-no-js-cft"><a href="javascript:void(0);" onclick="jQuery(this).parent().next().show(); jQuery(this).parent().next().next().show(); jQuery(this).parent().hide();">... ' . __('read more', 'custom-field-template') . '</a></span>';
269
+ $output .= '<span class="hide-if-js-cft">' . balanceTags($after, true) . '</span>';
270
+ $output .= '<span style="display:none;"><a href="javascript:void(0);" onclick="jQuery(this).parent().prev().hide(); jQuery(this).parent().prev().prev().show(); jQuery(this).parent().hide();">[^]</a></span>';
271
+ endif;
272
+ $output .= '</div>';
273
+ else :
274
+ $output .= '&nbsp;';
275
+ endif;
276
+ endif;
277
+
278
+ echo $output;
279
+ }
280
+
281
+ function add_manage_posts_columns($columns) {
282
+ $new_columns = array();
283
+ foreach($columns as $key => $val) :
284
+ $new_columns[$key] = $val;
285
+ if ( $key == 'tags' )
286
+ $new_columns['custom-fields'] = __('Custom Fields', 'custom-field-template');
287
+ endforeach;
288
+ return $new_columns;
289
+ }
290
+
291
+ function add_manage_pages_columns($columns) {
292
+ $new_columns = array();
293
+ foreach($columns as $key => $val) :
294
+ $new_columns[$key] = $val;
295
+ if ( $key == 'author' )
296
+ $new_columns['custom-fields'] = __('Custom Fields', 'custom-field-template');
297
+ endforeach;
298
+ return $new_columns;
299
+ }
300
+
301
+ function media_send_to_custom_field($html) {
302
+ $options = $this->get_custom_field_template_data();
303
+
304
+ $out = '<script type="text/javascript">' . "\n" .
305
+ ' /* <![CDATA[ */' . "\n" .
306
+ ' var win = window.dialogArguments || opener || parent || top;' . "\n" .
307
+ ' win.send_to_custom_field("' . addslashes($html) . '");' . "\n" .
308
+ '/* ]]> */' . "\n" .
309
+ '</script>' . "\n";
310
+
311
+ echo $out;
312
+
313
+ if ($options['custom_field_template_use_multiple_insert']) {
314
+ return;
315
+ } else {
316
+ exit();
317
+ }
318
+ }
319
+
320
  function wpaq_filter_plugin_actions($links, $file){
321
  static $this_plugin;
322
 
330
  }
331
 
332
  function custom_field_template_admin_scripts() {
333
+ wp_enqueue_script( 'jquery' );
334
  }
335
 
336
  function install_custom_field_template_data() {
596
  size = 35<br />
597
  hideKey = true<br />
598
 
599
+ <table class="widefat" style="margin:10px 0 5px 0;">
600
  <thead>
601
  <tr>
602
  <th>type</th><th>text or textfield</th><th>checkbox</th><th>radio</th><th>select</th><th>textarea</th>
653
  <tr>
654
  <th>blank</th><td>blank = true</td><td>blank = true</td><td>blank = true</td><td>blank = true</td><td>blank = true</td>
655
  </tr>
656
+ <tr>
657
+ <th>sort</th><td>sort = asc</td><td>sort = desc</td><td>sort = asc</td><td>sort = desc</td><td>sort = asc</td>
658
+ </tr>
659
  </tbody>
660
  </table>
661
  </div>
925
  }
926
 
927
  $rand = rand();
928
+
929
  if( $tinyMCE == true ) {
930
  $out = '<script type="text/javascript">' . "\n" .
931
  '// <![CDATA[' . "\n" .
941
 
942
  if ( substr($wp_version, 0, 3) >= '2.5' ) {
943
 
944
+ if ( !strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit.php') && !strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit-pages.php') ) {
945
+
946
  if ( $mediaButton == true ) {
947
  $media_upload_iframe_src = "media-upload.php";
948
  $media_title = __('Add Media');
965
  $switch .= '<a href="#toggle" onclick="switchMode(\''.$name.$rand.'\'); return false;">' . __('Toggle', 'custom-field-template') . '</a>';
966
  }
967
  $switch .= '</div>';
968
+ }
969
+
970
  }
971
 
972
  if ( $hideKey == true ) $hide = ' class="hideKey"';
1354
  ), $attr));
1355
 
1356
  if ( is_numeric($format) && $output = $options['shortcode_format'][$format] ) :
1357
+ $data = get_post_custom($post_id);
1358
 
1359
+ if( $data == null)
1360
  return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1361
 
1362
+ $count = count($options['custom_fields']);
1363
+ if ( $count ) :
1364
+ for ($i=0;$i<$count;$i++) :
1365
+ $fields = $this->get_custom_fields( $i );
1366
+ foreach ( $fields as $key => $val ) :
1367
+ if ( count($data[$key]) > 1 ) :
1368
+ if ( $val[0]['sort'] == 'asc' )
1369
+ sort($data[$key]);
1370
+ elseif ( $val[0]['sort'] == 'desc' )
1371
+ rsort($data[$key]);
1372
+ $replace_val = '<ul>';
1373
+ foreach ( $data[$key] as $val2 ) :
1374
+ $replace_val .= '<li>'.$val2.'</li>';
1375
+ endforeach;
1376
+ $replace_val .= '</ul>';
1377
+ elseif ( count($data[$key]) == 1 ) :
1378
+ $replace_val = $data[$key][0];
1379
+ else :
1380
+ $replace_val = '';
1381
+ endif;
1382
+ $output = preg_replace('/\['.$key.'\]/', $replace_val, $output);
1383
+ endforeach;
1384
+ endfor;
1385
+ endif;
1386
  else :
1387
  $fields = $this->get_custom_fields( $template );
1388
+
1389
  if( $fields == null)
1390
  return;
1391
 
1393
  foreach ( $fields as $key => $val ) :
1394
  $value = get_post_meta( $post_id, $key );
1395
  if ($value):
1396
+ if ( $val[0]['sort'] == 'asc' )
1397
+ sort($value);
1398
+ elseif ( $val[0]['sort'] == 'desc' )
1399
+ rsort($value);
1400
  foreach ( $val as $key2 => $val2 ) :
1401
  $hide = '';
1402
  if ( $val2['output'] == true ) :
1406
  if ( $val2['type'] == 'checkbox' ) :
1407
  if( in_array($val2['value'], $value) ) :
1408
  $output .= '<dt><span' . $hide . '>' . $key . '</span></dt>' . "\n";
1409
+ $output .= '<dd>' . $value[$key2] . '</dd>' . "\n";
1410
  endif;
1411
  else :
1412
  $output .= '<dt><span' . $hide . '>' . $key . '</span></dt>' . "\n";
custom-field-template.pot CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Custom Field Template\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2008-12-12 15:19+0900\n"
6
- "PO-Revision-Date: 2008-12-12 15:20+0900\n"
7
  "Last-Translator: \n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
@@ -13,166 +13,186 @@ msgstr ""
13
  "X-Poedit-Basepath: ../\n"
14
  "X-Poedit-SearchPath-0: custom-field-template\n"
15
 
16
- #: custom-field-template/custom-field-template.php:83
17
- #: custom-field-template/custom-field-template.php:84
18
- #: custom-field-template/custom-field-template.php:161
19
- #: custom-field-template/custom-field-template.php:210
20
- #: custom-field-template/custom-field-template.php:740
 
 
 
 
 
 
 
 
 
21
  msgid "Custom Field Template"
22
  msgstr ""
23
 
24
- #: custom-field-template/custom-field-template.php:95
25
  msgid "Settings"
26
  msgstr ""
27
 
28
- #: custom-field-template/custom-field-template.php:106
29
  msgid "Default Template"
30
  msgstr ""
31
 
32
- #: custom-field-template/custom-field-template.php:181
33
- #: custom-field-template/custom-field-template.php:185
34
- #: custom-field-template/custom-field-template.php:193
 
35
  msgid "Options updated."
36
  msgstr ""
37
 
38
- #: custom-field-template/custom-field-template.php:198
39
  msgid "Options resetted."
40
  msgstr ""
41
 
42
- #: custom-field-template/custom-field-template.php:202
43
  msgid "Options deleted."
44
  msgstr ""
45
 
46
- #: custom-field-template/custom-field-template.php:216
47
  msgid "Custom Field Template Options"
48
  msgstr ""
49
 
50
- #: custom-field-template/custom-field-template.php:226
51
  #, php-format
52
  msgid "Template Title %d"
53
  msgstr ""
54
 
55
- #: custom-field-template/custom-field-template.php:228
56
  #, php-format
57
  msgid "Template Instruction %d"
58
  msgstr ""
59
 
60
- #: custom-field-template/custom-field-template.php:230
61
  #, php-format
62
  msgid "Template Content %d"
63
  msgstr ""
64
 
65
- #: custom-field-template/custom-field-template.php:237
66
  msgid "In case that you would like to insert multiple images at once in use of the custom field media buttons"
67
  msgstr ""
68
 
69
- #: custom-field-template/custom-field-template.php:238
70
  msgid "Use multiple image inset"
71
  msgstr ""
72
 
73
- #: custom-field-template/custom-field-template.php:238
74
  msgid "Caution:"
75
  msgstr ""
76
 
77
- #: custom-field-template/custom-field-template.php:238
78
  msgid "You need to edit `wp-admin/includes/media.php`. Delete or comment out the code in the function media_send_to_editor."
79
  msgstr ""
80
 
81
- #: custom-field-template/custom-field-template.php:242
82
  msgid "In case that you would like to replace custom keys by labels if `label` is set"
83
  msgstr ""
84
 
85
- #: custom-field-template/custom-field-template.php:243
86
  msgid "Use labels in place of custom keys"
87
  msgstr ""
88
 
89
- #: custom-field-template/custom-field-template.php:246
90
  msgid "In case that you would like to add p and br tags in textareas automatically"
91
  msgstr ""
92
 
93
- #: custom-field-template/custom-field-template.php:247
94
  msgid "Use wpautop function"
95
  msgstr ""
96
 
97
- #: custom-field-template/custom-field-template.php:251
98
- #: custom-field-template/custom-field-template.php:270
99
- #: custom-field-template/custom-field-template.php:297
 
100
  msgid "Update Options &raquo;"
101
  msgstr ""
102
 
103
- #: custom-field-template/custom-field-template.php:260
104
- #: custom-field-template/custom-field-template.php:279
105
- #: custom-field-template/custom-field-template.php:306
106
- #: custom-field-template/custom-field-template.php:371
107
- #: custom-field-template/custom-field-template.php:387
 
108
  msgid "Click to toggle"
109
  msgstr ""
110
 
111
- #: custom-field-template/custom-field-template.php:261
112
  msgid "CSS"
113
  msgstr ""
114
 
115
- #: custom-field-template/custom-field-template.php:280
 
 
 
 
 
 
 
 
116
  msgid "PHP CODE (Experimental Option)"
117
  msgstr ""
118
 
119
- #: custom-field-template/custom-field-template.php:282
120
  msgid "Are you sure to save PHP codes? Please do it at your own risk."
121
  msgstr ""
122
 
123
- #: custom-field-template/custom-field-template.php:283
124
  msgid "This option is available only for `radio` and `select` types. You must set $values as an array."
125
  msgstr ""
126
 
127
- #: custom-field-template/custom-field-template.php:307
128
  msgid "Option List"
129
  msgstr ""
130
 
131
- #: custom-field-template/custom-field-template.php:372
132
  msgid "Reset Options"
133
  msgstr ""
134
 
135
- #: custom-field-template/custom-field-template.php:374
136
  msgid "Are you sure to reset options? Options you set will be reset to the default settings."
137
  msgstr ""
138
 
139
- #: custom-field-template/custom-field-template.php:378
140
  msgid "Unset Options &raquo;"
141
  msgstr ""
142
 
143
- #: custom-field-template/custom-field-template.php:388
144
  msgid "Delete Options"
145
  msgstr ""
146
 
147
- #: custom-field-template/custom-field-template.php:390
148
  msgid "Are you sure to delete options? Options you set will be deleted."
149
  msgstr ""
150
 
151
- #: custom-field-template/custom-field-template.php:394
152
  msgid "Delete Options &raquo;"
153
  msgstr ""
154
 
155
- #: custom-field-template/custom-field-template.php:532
156
  msgid "Clear"
157
  msgstr ""
158
 
159
- #: custom-field-template/custom-field-template.php:633
160
  msgid "Add Media"
161
  msgstr ""
162
 
163
- #: custom-field-template/custom-field-template.php:635
164
  msgid "Add an Image"
165
  msgstr ""
166
 
167
- #: custom-field-template/custom-field-template.php:637
168
  msgid "Add Video"
169
  msgstr ""
170
 
171
- #: custom-field-template/custom-field-template.php:639
172
  msgid "Add Audio"
173
  msgstr ""
174
 
175
- #: custom-field-template/custom-field-template.php:650
176
  msgid "Toggle"
177
  msgstr ""
178
 
2
  msgstr ""
3
  "Project-Id-Version: Custom Field Template\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2009-01-15 15:25+0900\n"
6
+ "PO-Revision-Date: 2009-01-15 15:26+0900\n"
7
  "Last-Translator: \n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
13
  "X-Poedit-Basepath: ../\n"
14
  "X-Poedit-SearchPath-0: custom-field-template\n"
15
 
16
+ #: custom-field-template/custom-field-template.php:218
17
+ msgid "read more"
18
+ msgstr ""
19
+
20
+ #: custom-field-template/custom-field-template.php:236
21
+ #: custom-field-template/custom-field-template.php:246
22
+ msgid "Custom Fields"
23
+ msgstr ""
24
+
25
+ #: custom-field-template/custom-field-template.php:314
26
+ #: custom-field-template/custom-field-template.php:315
27
+ #: custom-field-template/custom-field-template.php:409
28
+ #: custom-field-template/custom-field-template.php:466
29
+ #: custom-field-template/custom-field-template.php:1061
30
  msgid "Custom Field Template"
31
  msgstr ""
32
 
33
+ #: custom-field-template/custom-field-template.php:326
34
  msgid "Settings"
35
  msgstr ""
36
 
37
+ #: custom-field-template/custom-field-template.php:337
38
  msgid "Default Template"
39
  msgstr ""
40
 
41
+ #: custom-field-template/custom-field-template.php:429
42
+ #: custom-field-template/custom-field-template.php:433
43
+ #: custom-field-template/custom-field-template.php:441
44
+ #: custom-field-template/custom-field-template.php:449
45
  msgid "Options updated."
46
  msgstr ""
47
 
48
+ #: custom-field-template/custom-field-template.php:454
49
  msgid "Options resetted."
50
  msgstr ""
51
 
52
+ #: custom-field-template/custom-field-template.php:458
53
  msgid "Options deleted."
54
  msgstr ""
55
 
56
+ #: custom-field-template/custom-field-template.php:472
57
  msgid "Custom Field Template Options"
58
  msgstr ""
59
 
60
+ #: custom-field-template/custom-field-template.php:482
61
  #, php-format
62
  msgid "Template Title %d"
63
  msgstr ""
64
 
65
+ #: custom-field-template/custom-field-template.php:484
66
  #, php-format
67
  msgid "Template Instruction %d"
68
  msgstr ""
69
 
70
+ #: custom-field-template/custom-field-template.php:486
71
  #, php-format
72
  msgid "Template Content %d"
73
  msgstr ""
74
 
75
+ #: custom-field-template/custom-field-template.php:493
76
  msgid "In case that you would like to insert multiple images at once in use of the custom field media buttons"
77
  msgstr ""
78
 
79
+ #: custom-field-template/custom-field-template.php:494
80
  msgid "Use multiple image inset"
81
  msgstr ""
82
 
83
+ #: custom-field-template/custom-field-template.php:494
84
  msgid "Caution:"
85
  msgstr ""
86
 
87
+ #: custom-field-template/custom-field-template.php:494
88
  msgid "You need to edit `wp-admin/includes/media.php`. Delete or comment out the code in the function media_send_to_editor."
89
  msgstr ""
90
 
91
+ #: custom-field-template/custom-field-template.php:498
92
  msgid "In case that you would like to replace custom keys by labels if `label` is set"
93
  msgstr ""
94
 
95
+ #: custom-field-template/custom-field-template.php:499
96
  msgid "Use labels in place of custom keys"
97
  msgstr ""
98
 
99
+ #: custom-field-template/custom-field-template.php:502
100
  msgid "In case that you would like to add p and br tags in textareas automatically"
101
  msgstr ""
102
 
103
+ #: custom-field-template/custom-field-template.php:503
104
  msgid "Use wpautop function"
105
  msgstr ""
106
 
107
+ #: custom-field-template/custom-field-template.php:507
108
+ #: custom-field-template/custom-field-template.php:526
109
+ #: custom-field-template/custom-field-template.php:553
110
+ #: custom-field-template/custom-field-template.php:581
111
  msgid "Update Options &raquo;"
112
  msgstr ""
113
 
114
+ #: custom-field-template/custom-field-template.php:516
115
+ #: custom-field-template/custom-field-template.php:535
116
+ #: custom-field-template/custom-field-template.php:562
117
+ #: custom-field-template/custom-field-template.php:590
118
+ #: custom-field-template/custom-field-template.php:665
119
+ #: custom-field-template/custom-field-template.php:681
120
  msgid "Click to toggle"
121
  msgstr ""
122
 
123
+ #: custom-field-template/custom-field-template.php:517
124
  msgid "CSS"
125
  msgstr ""
126
 
127
+ #: custom-field-template/custom-field-template.php:536
128
+ msgid "[cft] Shortcode Format"
129
+ msgstr ""
130
+
131
+ #: custom-field-template/custom-field-template.php:539
132
+ msgid "[key] will be converted into the value of [key]."
133
+ msgstr ""
134
+
135
+ #: custom-field-template/custom-field-template.php:563
136
  msgid "PHP CODE (Experimental Option)"
137
  msgstr ""
138
 
139
+ #: custom-field-template/custom-field-template.php:565
140
  msgid "Are you sure to save PHP codes? Please do it at your own risk."
141
  msgstr ""
142
 
143
+ #: custom-field-template/custom-field-template.php:566
144
  msgid "This option is available only for `radio` and `select` types. You must set $values as an array."
145
  msgstr ""
146
 
147
+ #: custom-field-template/custom-field-template.php:591
148
  msgid "Option List"
149
  msgstr ""
150
 
151
+ #: custom-field-template/custom-field-template.php:666
152
  msgid "Reset Options"
153
  msgstr ""
154
 
155
+ #: custom-field-template/custom-field-template.php:668
156
  msgid "Are you sure to reset options? Options you set will be reset to the default settings."
157
  msgstr ""
158
 
159
+ #: custom-field-template/custom-field-template.php:672
160
  msgid "Unset Options &raquo;"
161
  msgstr ""
162
 
163
+ #: custom-field-template/custom-field-template.php:682
164
  msgid "Delete Options"
165
  msgstr ""
166
 
167
+ #: custom-field-template/custom-field-template.php:684
168
  msgid "Are you sure to delete options? Options you set will be deleted."
169
  msgstr ""
170
 
171
+ #: custom-field-template/custom-field-template.php:688
172
  msgid "Delete Options &raquo;"
173
  msgstr ""
174
 
175
+ #: custom-field-template/custom-field-template.php:831
176
  msgid "Clear"
177
  msgstr ""
178
 
179
+ #: custom-field-template/custom-field-template.php:948
180
  msgid "Add Media"
181
  msgstr ""
182
 
183
+ #: custom-field-template/custom-field-template.php:950
184
  msgid "Add an Image"
185
  msgstr ""
186
 
187
+ #: custom-field-template/custom-field-template.php:952
188
  msgid "Add Video"
189
  msgstr ""
190
 
191
+ #: custom-field-template/custom-field-template.php:954
192
  msgid "Add Audio"
193
  msgstr ""
194
 
195
+ #: custom-field-template/custom-field-template.php:965
196
  msgid "Toggle"
197
  msgstr ""
198
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://wordpressgogo.com/development/custom-field-template.html
4
  Tags: custom, fields, field, template, meta, custom field, custom fields, custom field template
5
  Requires at least: 2.1
6
  Tested up to: 2.7
7
- Stable tag: 0.8
8
 
9
  This plugin adds the default custom fields on the Write Post/Page.
10
 
@@ -31,6 +31,8 @@ The Custom Field Template plugin adds the default custom fields on the Write Pos
31
  * Adds the blank option. (`blank = true`)
32
  * Adds the break type. Set CSS of '#cft div'. (`type = break`)
33
  * Adds [cft] Shortcode Format.
 
 
34
 
35
  Localization
36
 
4
  Tags: custom, fields, field, template, meta, custom field, custom fields, custom field template
5
  Requires at least: 2.1
6
  Tested up to: 2.7
7
+ Stable tag: 0.9
8
 
9
  This plugin adds the default custom fields on the Write Post/Page.
10
 
31
  * Adds the blank option. (`blank = true`)
32
  * Adds the break type. Set CSS of '#cft div'. (`type = break`)
33
  * Adds [cft] Shortcode Format.
34
+ * Adds the sort option. (`sort = asc` or `sort = desc`)
35
+ * Support for Quick Edit of custom fields. (tinyMCE and mediaButton are not supported yet)
36
 
37
  Localization
38