Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with data saved in some array key #7

Open
andronic90 opened this issue Aug 9, 2017 · 4 comments
Open

Problem with data saved in some array key #7

andronic90 opened this issue Aug 9, 2017 · 4 comments

Comments

@andronic90
Copy link

Problem is in options like this:

'text-1' => array(
	'label'   => __('Text', 'unyson'),
	'desc'    => __('Write some text', 'unyson'),
	'type'    => 'textarea',
),

in frontend all works fine, the key that come is "text_1", but in dashboard the textarea is empty: https://static.md/0cead103e48ece8791c42619a212da87.png

If you need more details please contact me and I give you additional information.

@andreiglingeanu
Copy link
Collaborator

andreiglingeanu commented Aug 9, 2017

Please do not use dashes in options, AFAIK they are buggy and very unstable. Avoid them, if possible.

Do the options with dashes (-) in them work in regular page builder modals?

@andronic90
Copy link
Author

Hi @andreiglingeanu, I know the problem with dashes, but we used this in 2-3 existing shortcodes and now this is a problem. (I reported some time ago and know that moldcraft fixed this on frontend, I don't remember if works and in backend)

In the regular page builder this works fine.

@andreiglingeanu
Copy link
Collaborator

andreiglingeanu commented Aug 10, 2017

Can you recall where the original issue was? I mean if you can provide the context for the discussion it would be nice.

cc @danyj

@danyj
Copy link

danyj commented Aug 10, 2017

as far as I know backend ( WP ) converts the dash to underscore so it is kinda impossible to find its ref after the save,

it has been said always to avoid dashes and booleans ( for choices ) in options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants