function bootstrap_setting

8 deprecated.php bootstrap_setting($name, $theme = NULL, $prefix = 'bootstrap')
7 bootstrap_setting($name, $theme = NULL, $prefix = 'bootstrap')

Retrieves a setting for the current theme or for a given theme.

  // Before ("button_colorize" and "my_subtheme_custom_option").
  $colorize = bootstrap_setting('button_colorize', 'my_subtheme');
  $custom_option = bootstrap_setting('custom_option', 'my_subtheme', 'my_subtheme');

  // After ("button_colorize" and "my_subtheme_custom_option").
  use Drupal\bootstrap\Bootstrap;
  $my_subtheme = Bootstrap::getTheme('my_subtheme');


string $name: The name of the setting to be retrieved.

string $theme: The name of a given theme; defaults to the currently active theme.

string $prefix: The prefix used on the $name of the setting, this will be appended with "_" automatically if set.

Return value

mixed The value of the requested setting, NULL if the setting does not exist.


Will be removed in a future release.

Source ./deprecated.php (line 863)

function bootstrap_setting($name, $theme = NULL, $prefix = 'bootstrap') {
  $theme = Bootstrap::getTheme($theme);
  $prefix = $prefix !== 'bootstrap' && !empty($prefix) ? $prefix . '_' : '';
  return $theme->getSetting($prefix . $name);