-
Notifications
You must be signed in to change notification settings - Fork 34
/
readme.txt
365 lines (255 loc) · 10.2 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
=== Smart Custom Fields ===
Contributors: inc2734, toro_unit, mimosafa, hideokamoto, hisako-isaka, kurudrive, hanamura, justinticktock, designhehe, mayukojpn, hogetan, robssanches, mirucon, sysbird, kengyu-nakamura, fuyuan9
Donate link: http://www.amazon.co.jp/registry/wishlist/39ANKRNSTNW40
Tags: plugin, custom field, custom, field, meta, meta field, repeat, repeatable
Requires at least: 6.4
Requires PHP: 7.4
Tested up to: 6.4
Stable tag: 5.0.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Smart Custom Fields is a simple plugin for managing custom fields.
== Description ==
Smart Custom Fields is a simple plugin for managing custom fields.
= Features =
* Field group loop support.
* Meta data revision support.
* Meta data preview support.
https://www.youtube.com/watch?v=WxPZurn0yvI
= Field Types =
* Text
* Textarea
* Radio
* Select
* Checkbox
* WYSIWYG editor
* Image
* File
* Related Posts
* Related Terms
* Color picker
* Date picker
* Datetime picker
* Boolean
* Message
= How to get meta data ? =
**The return value of each of the following methods is not sanitized. Please sanitize them if necessary. **
https://developer.wordpress.org/apis/security/escaping/
**Post meta data**
This method can get any meta data.
`SCF::get( 'field-name' )`
This method can get meta data of any group.
`SCF::get( 'group-name' )`
This method can get all meta data.
`SCF::gets()`
**User meta data**
This method can get any user meta data.
`SCF::get_user_meta( $user_id, 'field-name' )`
This method can get user meta data of any group.
`SCF::get_user_meta( $user_id, 'group-name' )`
This method can get all user meta data.
`SCF::get_user_meta( $user_id )`
**Term meta data**
This method can get any term meta data.
`SCF::get_term_meta( $term_id, $taxonomy 'field-name' )`
This method can get term meta data of any group.
`SCF::get_term_meta( $term_id, $taxonomy, 'group-name' )`
This method can get all term meta data.
`SCF::get_term_meta( $term_id, $taxonomy )`
**Custom options page meta data**
This method can get any custom options page meta data.
`SCF::get_option_meta( $menu_slug, 'field-name' )`
This method can get custom options page meta data of any group.
`SCF::get_option_meta( $menu_slug, 'group-name' )`
This method can get all custom options page meta data.
`SCF::get_option_meta( $menu_slug )`
= Create custom options page =
`SCF::add_options_page( $page_title, $menu_title, $capability, $menu_slug, $icon_url = '', $position = null );`
= Register custom fields by the code. =
https://gist.github.com/inc2734/9f6d65c7473d060d0fd6
= GitHub =
https://github.com/inc2734/smart-custom-fields/
= Translators =
* Japanese(ja) - [JOTAKI Taisuke](https://profiles.wordpress.org/tai/)
You can translate this plugin into your language by using [GlotPress](https://translate.wordpress.org/projects/wp-plugins/smart-custom-fields).
== Installation ==
1. Upload `Smart Custom Fields` to the `/wp-content/plugins/` directory
1. Activate the plugin through the 'Plugins' menu in WordPress
1. You can setting custom fields in 'Smart Custom Fields' page.
== Screenshots ==
1. Smart Custom Fields settings page.
2. Post edit page.
== Changelog ==
= 5.0.0 =
* WordPress 6.4 or higher is now required.
* PHP 7.4 or higher is now required.
* Security fix.
= 4.2.2 =
* Fix fatal error that occurred when using with bogo.
= 4.2.1 =
* Fix Worning/Fatal error on PHP7/8.
* Fix sanitize missing in the textarea field.
* Add list to the wysiwyg field.
= 4.1.6
* Some updates by [@kengyu](https://github.com/kengyu)
* Add filter hook smart-cf-rest_api_post_type by [@fuyuan9](https://github.com/fuyuan9)
= 4.1.5 =
* Fix ajax bug.
= 4.1.4 =
* WordPress 5.5 support
* Changed so that the reusable block post type is not displayed in the conditional judgment.
= 4.1.3 =
* Activate datetimepicker in repeat group #80
= 4.1.2 =
* Fix PHP syntax error.
= 4.1.0 =
* feat: Implement new field datetime picker
* feat: Add filters for related posts fields with name and post types
= 4.0.2 =
* Some updates by [@robssanches](https://github.com/robssanches)
= 4.0.0 =
* Add message field. #64 (by [@robssanches](https://github.com/robssanches))
* Fix boolean field bug with `smart-cf-register-fields` filter hook.
* Refactoring displaying options process of each fields.
= 3.1.7 =
* Fixing issues and adding support for the Brazilian Portuguese language #63 (by [@robssanches](https://github.com/robssanches))
* Spelling fixes in Readme #62 (by [@garrett-eclipse](https://github.com/garrett-eclipse))
= 3.1.6 =
* Set any on related post status. #60 (by [@mayukojpn](https://github.com/mayukojpn))
* Changed that file names can be known when uploading files. #58 (by [@shodoi](https://github.com/shodoi))
= 3.1.5 =
* Fixed a bug that disappeared layout when introducing description in relation field. #56 (by [@mayukojpn](https://github.com/mayukojpn))
* Update item delete button style in relation field.
* Fix bug when using smart-cf-register-fields hook.
= 3.1.4 =
* Remove no used codes.
* Fixed a bug that name disappears when opening / closing a field. #51 (by [@yousan](https://github.com/yousan))
= 3.1.3 =
* Fix Selectable number bug
= 3.1.2 =
* Update readme.txt
= 3.1.1 =
* Fixed a bug of limit attribute at relation post types and taxonomies field.
= 3.1.0 =
* Added limit attribute at relation post types and taxonomies field.
= 3.0.1 =
* Fixed a bug that icon and display position of created option page are not reflected #47 (by [@designhehe](https://github.com/designhehe))
= 3.0.0 =
* Support multiple user roles.
* Update filter hook smart-cf-register-fields
= 2.3.0 =
* Support displayed thumbnail when value of file and image field is file url.
= 2.2.3 =
* Fix get_post_metadata hooked only preview #43 (by [@wireframeslayout](https://github.com/wireframeslayout))
= 2.2.2 =
* Fix #37 #38
= 2.2.1 =
* Fix bug boolean field in repeatable group #39
* Fix bug datepicker and colorpicker in repeatable group #41
= 2.2.0 =
* Refactoring tests.
* Changed behavior of the default value of new field of the already saved object. Using the default value.
= 2.1.1 =
* Fix revision lines duplication (by [@hanamura](https://github.com/hanamura))
* Fixed a bug that relation fields don't work on the options page.
= 2.1.0 =
* Support separated key and value in select, checkbox, radio.
* Added switching editor mode tab in wysiwyg field.
* Added instruction of field option.
= 2.0.0 =
* Refactoring
* Added meta data of custom options page.
= 1.7.0 =
* Added taxonomy relation field.
* Added textarea rows setting.
* Fixed a bug that tinymce js error when disabled rich editing.
= 1.6.7 =
* Removed console.log in a js file.
= 1.6.6 =
* Fixed a bug that warning is out when the array isn't returned in the smart-cf-register-fields.
= 1.6.5 =
* Fixed a bug that multi value in the loop is broken.
* In setting screen, if the field is closed, display the field name.
= 1.6.4 =
* Fixed a bug that wysiwyg fields became tinymce default format when content editor mode is text.
* Change the comment in English.
= 1.6.3 =
* Fixed a bug that metadata that isn't defined by Smart Custom Fields can't get in preview.
= 1.6.2 =
* Fixed a bug that sometimes can't get data when there are multiple Smart Custom Fields settings.
= 1.6.1 =
* Fixed a bug that custom field settings vanished when saved.
= 1.6.0 =
* Added search feature in the relation field.
* Changed when the object isn't saved, default value is active.
* Remove filter hook smart-cf-is_use_default_when_not_saved.
* Fixed a bug that isn't displayed meta data in preview when using custom fields settings with post id.
= 1.5.3 =
* Fixed a wysiwyg field bug.
= 1.5.2 =
* Fixed a wysiwyg field bug.
= 1.5.1 =
* Fixed a relation field bug.
= 1.5.0 =
* Update wysiwyg field.
= 1.4.0 =
* refactoring controllers.
* Add term custom fields.
* Add filter hook smart-cf-is_use_default_when_not_saved
* Changed to the default value is used if the value has not been saved. If you want to revert to the previous behavior, return false in smart-cf-is_use_default_when_not_saved.
= 1.3.2 =
* Add preview size setting in the image field.
* Add display direction setting in the checkbox and radio field.
* Changed the upload field that displayed uploaded to this post first.
= 1.3.1 =
* Fixed a wysiwyg field bug.
* Add boolean field.
= 1.3.0 =
* refactoring.
* Add profile custom fields.
* Add filter hook smart-cf-validate-get-value
* Add method SCF::get_user_meta( $user_id, $name = null )
* Fixed a revision bug.
* Fixed a bug that thumbnail is not displayed correctly in preview.
* Fixed a relation field bug.
* Changed return value of SCF::get with multiple data in loop.
* Changed revision screen format.
= 1.2.2 =
* Fixed a bug that can not get the correct data when the posts use post id filtering.
* Changed that original the_content filter does not apply to wysiwyg field.
* Add post_id attribute to smart-cf-register-fields.
= 1.2.1 =
* Fixed a bug that post id filtering incorrect.
= 1.2.0 =
* refactoring. A lot of changes in all.
* Renewed the Smart_Custom_Fields_Field_Base.
* Add filter hook smart-cf-register-fields. If You use this hook, you can define custom fields by the code.
* Add action hook smart-cf-before-editor-enqueue-scripts
* Add action hook smart-cf-after-editor-enqueue-scripts
* Add action hook smart-cf-before-settings-enqueue-scripts
* Add action hook smart-cf-after-settings-enqueue-scripts
= 1.1.3 =
* Change method SCF::get_field to SCF::get_value_by_field
* Change method SCF::get_sub_field to SCF::get_values_by_group
* Add method SCF::get_field
* Add method SCF::choices_eol_to_array
* remove method Smart_Custom_Fields_Field_Base::get_choices
= 1.1.2 =
* Add action hook smart-cf-fields-loaded
= 1.1.1 =
* UX Improvement of settings page.
= 1.1.0 =
* Add date picker field.
= 1.0.3 =
* Fixed a bug that can't be get the correct data when specify a $post_id attribute to SCF::get(). For example SCF::get( 'key', $post_id )
= 1.0.2 =
* Add color picker field.
* Add smart-cf-before-save-post action hook.
* Add smart-cf-after-save-post action hook.
* Add smart-cf-validate-save-post filter hook.
= 1.0.1 =
* Add display condition by post id.
* Fixed bug that is not displayed wysiwyg editor when there are not content editor.
* Textarea does not filter the_content filter in SCF::get() and SCF::gets().
= 1.0.0 =
* Initial release.