Skip navigation
Help

drupal_get_profile

7 common.inc drupal_get_profile()

Get the name of the currently active install 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 install profile.

16 calls to drupal_get_profile()

File

drupal/includes/common.inc, line 208
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;
}