function drupal_get_profile

Gets the name of the currently active installation profile.

When this function is called during Drupal's initial installation process, the name of the profile that's about to be installed is stored in the global installation state. At all other times, the standard Drupal systems variable table contains the name of the current profile, and we can call variable_get() to determine what one is active.

Return value

$profile The name of the installation profile.

13 calls to drupal_get_profile()
drupal_install_profile_distribution_name in drupal/core/includes/install.inc
Loads the installation profile, extracting its defined distribution name.
drupal_required_modules in drupal/core/includes/module.inc
Returns an array of modules required by core.
drupal_verify_profile in drupal/core/includes/install.inc
Verifies that all dependencies are met for a given installation profile.
install_base_system in drupal/core/includes/install.core.inc
Installation task; install the base functionality Drupal needs to bootstrap.
install_finished in drupal/core/includes/install.core.inc
Performs final installation steps and displays a 'finished' page.

... See full list

File

drupal/core/includes/common.inc, line 246
Common functions that many Drupal modules will need to reference.

Code

function drupal_get_profile() {
  global $install_state;
  if (isset($install_state['parameters']['profile'])) {
    $profile = $install_state['parameters']['profile'];
  }
  else {
    $profile = variable_get('install_profile', 'standard');
  }
  return $profile;
}