For example, i want to provide a list of possible social icons. I want the theme configuration to save the name of the social networking service (Twitter, Facebook, etc) together with its corresponding font awesome icon.
Maybe something like this:
Code: Select all
$socialicons = array();
for ($i = 0; $i < $template_loaded_config['social_icons_amount']; $i++) {
$template_config[] = array(
'var' => 'social_icon' . $i . 'icon',
'name' => 'SocialNameAndIcon ' .($i),
'type' => 'select',
'default' => 'Amazon',
'select_values' => array('Amazon,fa-amazon' => 'Amazon',
'Facebook,fa-facebook' =>'Facebook',
'Flickr,fa-flickr' => 'Flickr',
'Github,fa-github' => 'Github',
'Google Plus,fa-google-plus' => 'Google Plus',)
);
$template_config[] = array(
'var' => 'social_icon' . $i . 'url',
'name' => SOCIAL_ICON_URL,
'type' => 'string',
'default' => '#',
);
$socialicons[] = array(
'icon' => $template_loaded_config['social_icon' . $i . 'icon'],
'url' => $template_loaded_config['social_icon' . $i . 'url'],
);