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

adding a user defined array INTO THE OPTIONS #370

Open
rogerad opened this issue Oct 14, 2016 · 1 comment
Open

adding a user defined array INTO THE OPTIONS #370

rogerad opened this issue Oct 14, 2016 · 1 comment

Comments

@rogerad
Copy link

rogerad commented Oct 14, 2016

HI
I have created an array of values in my program which I want TO LOAD INTO THE OPTIONS ARRAY of a radio box .
i do not know what the values will be.
eg I am loading all the user roles in wordpress. but these roles might change on different wordpress sites.
is this possible ??

i caNNOT use the hooks correctly
thank you

@rogerad
Copy link
Author

rogerad commented Oct 17, 2016

I CAN ADD THE ITEMS INTO THE ARRAY CORRECTLY NOW BUT WHEN THERE ARE MORE THAN 10 ITEMS , THE 10 TH ITEM AND LATER IS AN UNDEFINED OFFSET MESSAGE
EG ERROR MESSAGE ON THESE LINES

'10' => $option_wp_roles_string[10],
'11' => $option_wp_roles_string[11],
'12' => $option_wp_roles_string[12],
'13' => $option_wp_roles_string[13],

THE MESSAGE DOES NOT APPEAR ON ALL MY COMPUTERS ONLY ON 1 OF THEM

Notice: Undefined offset: 12 in C:\xampp\apps\wordpress\htdocs\wp-content\plugins\40mtest\40mtest.php on line 288

THESE LINES BELOW ARE PERFECT
$aa_panel->createOption( array(
'name' => 'User Role Access',
'id' => 'aa_general_role',
'type' => 'multicheck',
'desc' => 'Which User Roles have Access to website - Administrators always have access',
'options' => array(
// '1' => $option_wp_roles_string[0],
'1' => $option_wp_roles_string[1],
'2' => $option_wp_roles_string[2],

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

1 participant