gambitph / Titan-Framework

The easiest to use WordPress option framework.
http://www.titanframework.net
377 stars 137 forks source link

adding a user defined array INTO THE OPTIONS #370

Open rogerad opened 8 years ago

rogerad commented 8 years ago

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 commented 8 years ago

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],