You are here

function improved_theme_settings_get_setting in Open Social 8.4

Same name and namespace in other branches
  1. 8.9 modules/custom/improved_theme_settings/improved_theme_settings.module \improved_theme_settings_get_setting()
  2. 8 modules/custom/improved_theme_settings/improved_theme_settings.module \improved_theme_settings_get_setting()
  3. 8.2 modules/custom/improved_theme_settings/improved_theme_settings.module \improved_theme_settings_get_setting()
  4. 8.3 modules/custom/improved_theme_settings/improved_theme_settings.module \improved_theme_settings_get_setting()
  5. 8.5 modules/custom/improved_theme_settings/improved_theme_settings.module \improved_theme_settings_get_setting()
  6. 8.6 modules/custom/improved_theme_settings/improved_theme_settings.module \improved_theme_settings_get_setting()
  7. 8.7 modules/custom/improved_theme_settings/improved_theme_settings.module \improved_theme_settings_get_setting()
  8. 8.8 modules/custom/improved_theme_settings/improved_theme_settings.module \improved_theme_settings_get_setting()
  9. 10.3.x modules/custom/improved_theme_settings/improved_theme_settings.module \improved_theme_settings_get_setting()
  10. 10.0.x modules/custom/improved_theme_settings/improved_theme_settings.module \improved_theme_settings_get_setting()
  11. 10.1.x modules/custom/improved_theme_settings/improved_theme_settings.module \improved_theme_settings_get_setting()
  12. 10.2.x modules/custom/improved_theme_settings/improved_theme_settings.module \improved_theme_settings_get_setting()

Function that returns a valid integer or FALSE.

1 call to improved_theme_settings_get_setting()
improved_theme_settings_page_attachments in modules/custom/improved_theme_settings/improved_theme_settings.module
Implements hook_page_attachments().

File

modules/custom/improved_theme_settings/improved_theme_settings.module, line 190
Improved theme settings module file.

Code

function improved_theme_settings_get_setting($setting, $themename) {

  // Fetch setting from the theme.
  $themevar = Xss::filter(theme_get_setting($setting, $themename));

  // In this case '' is something different than 0.
  if ($themevar !== trim(intval($themevar))) {
    return FALSE;
  }
  return $themevar;
}