If I can dare, here is a snippet to see the list of available CSS skins for the Flashlight theme.
Create your skins within the /wp-content/themes/flashlight/css folder and name it following this schema:
example1-skin.css
example2-skin.css
example3-skin.css
Open this file:
/wp-content/themes/flashlight/includes/admin/register-admin-options.php
Insert the following code after line 63 - before the $avia_elements[] = array( definition:
/**
* shows all the available skins
* @since 13/03/2021
* by camaleo, info@myeasywp.com
*/
$available_skins = array();
$available_skins['Minimal (minimal-skin.css)'] = 'minimal-skin.css';
$available_skins['Dark (dark-skin.css)'] = 'dark-skin.css';
$data = scandir( TEMPLATEPATH . '/css' );
if(is_array($data)) {
foreach($data as $key => $file) {
if($file != '.' && $file != '..'
&& $file != 'minimal-skin.css' && $file != 'dark-skin.css'
&& substr($file, -9) == '-skin.css') {
$available_skins['Custom (' . $file . ')'] = $file;
}
}
}
Replace this code:
$avia_elements[] = array(
"slug" => "styling",
"name" => "Which general color scheme should be used?",
"desc" => "You can choose between a light and a dark color scheme here.",
"id" => "stylesheet",
"type" => "select",
"std" => "minimal-skin.css",
"target" => array("default_slideshow_target::.live_bg_default::set_id"),
"subtype" => array('Minimal (minimal-skin.css)'=>'minimal-skin.css','Dark (dark-skin.css)'=>'dark-skin.css'));
With this code:
$avia_elements[] = array(
"slug" => "styling",
"name" => "Which general color scheme should be used?",
"desc" => "You can choose between a light and a dark color scheme here.",
"id" => "stylesheet",
"type" => "select",
"std" => "minimal-skin.css",
"target" => array("default_slideshow_target::.live_bg_default::set_id"),
// "subtype" => array('Minimal (minimal-skin.css)'=>'minimal-skin.css','Dark (dark-skin.css)'=>'dark-skin.css')); /* camaleo: 13/03/2021 */
"subtype" => $available_skins); /* camaleo: 13/03/2021 */
When you load the theme options page, you will be able to select all the additional skins you have created in the drop down menu.
As far as I understood the theme administration code is used in several themes, Kriesi please add this code in the main repository so everyone can use it if needed - and I can forget to edit the script at the next update ;-)
If you do not like me to add similar clues in the future, please excuse me and let me know - I am so enthusiast I couldn't resist.
Gross gott!














