1.20.x install.inc | backdrop_install_profile_distribution_name() |
Loads the installation profile, extracting its defined distribution name.
Return value
The distribution name defined in the profile's .info file. Defaults to: "Silkscreen CMS" if none is explicitly provided by the installation profile.
See also
File
- includes/
install.inc, line 211 - API functions for installing modules and themes.
Code
function backdrop_install_profile_distribution_name() {
// During installation, the profile information is stored in the global
// installation state (it might not be saved anywhere yet).
if (backdrop_installation_attempted()) {
global $install_state;
return $install_state['profile_info']['distribution_name'];
}
// At all other times, we load the profile via standard methods.
else {
$profile = backdrop_get_profile();
$info = system_get_info('module', $profile);
return $info['distribution_name'];
}
}