Forum Replies Created
-
AuthorPosts
-
SteveKeymasterI did some quick testing and for some reason
'min' => 0,forces the field to save as an array. I haven’t dug into the reason yet, but I thought it might help you to know.
SteveKeymasterThat certainly looks like it would be fixed by the upgrade script.
Here are more detailed instructions on fixing the script. Try this and let me know if it works.
SteveKeymasterPiklist settings are saved using the WordPress settings api, which saves all data as an array.
In the Piklist Demos we replicate the core WordPress SETTINGS > READING page, which saves data as separate values. Here are the examples from the Demos.
You would need to create a form, like this:
https://github.com/piklist/piklist/blob/develop/add-ons/piklist-demos/parts/forms/reading-settings.phpAnd then create an admin page where you would embed your form:
https://github.com/piklist/piklist/blob/c16ebde4eef529ad97337c83ac54c3192e0cddbd/add-ons/piklist-demos/parts/admin-pages/reading-settings.php#L26
SteveKeymasterthe piklist form shortcode is required for now
SteveKeymasterI suggest you look at the
piklist_save_fieldshook, that should help you look at your field data before save.Using the standard WordPress filter
wp_insert_post_data, will also help you look at data before it’s saved:
https://codex.wordpress.org/Plugin_API/Filter_Reference/wp_insert_post_data
SteveKeymasterthis should be fixed in Piklist 1.0.4
SteveKeymasterWe’ll work on fixing the warnings. The error is in the Demo add-on. As long as you don’t activate it you should be fine.
SteveKeymasterPiklist is not fully compatible for WordPress 5.0+. Please use the Classic Editor plugin which allows it to work:
SteveKeymasterI’m still confused. I don’t see a reference to a hidden field.
SteveKeymasterget_optionsaves everything as an array
SteveKeymasterYup… that is the usually the case: https://piklist.github.io/docs/faq/fields-not-saving/
SteveKeymasterCan you post some code so we can take a look?
SteveKeymasterHave you tried
remove_shortcode:
https://developer.wordpress.org/reference/functions/remove_shortcode/
SteveKeymasterso,
$vsocial = $settings[‘social_group’];is not returning any data?
SteveKeymasterYou can create a hidden field by setting the field type to hidden.
-
AuthorPosts