Skip to content

Commit a58dce6

Browse files
committed
Add $default parameter to deprecated bootstrap_setting()
Issue #2763749 by markcarver, jorgediazhav: Make table_responsive setting smarter Signed-off-by: Mark Carver <[email protected]>
1 parent b58b412 commit a58dce6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

deprecated.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,8 @@ function bootstrap_include($theme, $path) {
895895
* @param string $prefix
896896
* The prefix used on the $name of the setting, this will be appended with
897897
* "_" automatically if set.
898+
* @param mixed $default
899+
* The default value to return if setting doesn't exist or is not set.
898900
*
899901
* @return mixed
900902
* The value of the requested setting, NULL if the setting does not exist.
@@ -916,9 +918,9 @@ function bootstrap_include($theme, $path) {
916918
* @see \Drupal\bootstrap\Theme::getSetting()
917919
* @see \Drupal\bootstrap\Bootstrap::getTheme()
918920
*/
919-
function bootstrap_setting($name, $theme = NULL, $prefix = 'bootstrap') {
921+
function bootstrap_setting($name, $theme = NULL, $prefix = 'bootstrap', $default = NULL) {
920922
Bootstrap::deprecated();
921923
$theme = Bootstrap::getTheme($theme);
922924
$prefix = $prefix !== 'bootstrap' && !empty($prefix) ? $prefix . '_' : '';
923-
return $theme->getSetting($prefix . $name);
925+
return $theme->getSetting($prefix . $name, $default);
924926
}

0 commit comments

Comments
 (0)