function styleswitcher_styles_settings in Style Switcher 6.2
Same name and namespace in other branches
- 8.2 styleswitcher.module \styleswitcher_styles_settings()
- 7.2 styleswitcher.module \styleswitcher_styles_settings()
- 3.0.x styleswitcher.module \styleswitcher_styles_settings()
Returns a list of styles with theme-specific settings.
Parameters
string $theme: Name of the theme to get styles settings for.
Return value
array Array which keys are styles machine names and each element is a corresponding array with settings: weight, status and is_default. All settings are optional. See styleswitcher_style_load() for their descriptions.
See also
1 call to styleswitcher_styles_settings()
- styleswitcher_style_load_multiple in ./
styleswitcher.module - Returns a list of styles.
3 string references to 'styleswitcher_styles_settings'
- styleswitcher_config_theme_submit in ./
styleswitcher.admin.inc - Form submission handler for styleswitcher_config_theme().
- styleswitcher_style_form_submit in ./
styleswitcher.admin.inc - Form submission handler for styleswitcher_style_form().
- styleswitcher_uninstall in ./
styleswitcher.install - Implements hook_uninstall().
File
- ./
styleswitcher.module, line 449 - Module's hooks implementations and helper functions.
Code
function styleswitcher_styles_settings($theme) {
$settings = variable_get('styleswitcher_styles_settings', array());
if (empty($settings[$theme])) {
$settings[$theme] = array();
styleswitcher_theme_styles($theme);
// Disable the blank style if theme has its own default one.
if (styleswitcher_theme_default_style_key($theme)) {
$settings[$theme]['custom/default']['status'] = FALSE;
}
}
return $settings[$theme];
}