You are here

function _magic_build_settings_php_export in Magic 7.2

Same name and namespace in other branches
  1. 7 magic.module \_magic_build_settings_php_export()

A helper function to print the theme settings withing settings.php.

Parameters

array $array: An array of the current settings saved.

string $theme: The theme key we are building the export for.

Return value

string The theme's settings array prepared for the settings.php file.

1 call to _magic_build_settings_php_export()
magic_export_settings in includes/magic.export.inc
Exports theme settings.

File

includes/magic.export.inc, line 128
Form and utility functions for exporting theme settings.

Code

function _magic_build_settings_php_export($array, $theme) {
  $export = '';
  foreach ($array['settings'] as $name => $value) {
    $export .= "\$conf['magic']['{$theme}']['{$name}'] = " . var_export($value, TRUE) . ";\n";
  }
  return $export;
}