diff --git a/modules/block/block.module b/modules/block/block.module index e2cce6b..2af4c88 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -613,13 +613,14 @@ function block_form_user_profile_form_alter(&$form, &$form_state) { * Implements hook_field_extra_fields(). */ function block_field_extra_fields() { - $extra['user']['user']['form']['block'] = array( - 'label' => t('Personalize blocks'), - 'description' => t('Block module form element.'), - 'weight' => 3, - ); - - return $extra; + if (variable_get('drupal_enable_core_extra_fields')) { + $extra['user']['user']['form']['block'] = array( + 'label' => t('Personalize blocks'), + 'description' => t('Block module form element.'), + 'weight' => 3, + ); + return $extra; + } } /** diff --git a/modules/contact/contact.module b/modules/contact/contact.module index 54711b3..8717635 100644 --- a/modules/contact/contact.module +++ b/modules/contact/contact.module @@ -262,11 +262,12 @@ function contact_form_user_admin_settings_alter(&$form, &$form_state) { * Implements hook_field_extra_fields(). */ function contact_field_extra_fields() { - $extra['user']['user']['form']['contact'] = array( - 'label' => t('Contact settings'), - 'description' => t('Contact module form element.'), - 'weight' => 5, - ); - - return $extra; + if (variable_get('drupal_enable_core_extra_fields')) { + $extra['user']['user']['form']['contact'] = array( + 'label' => t('Contact settings'), + 'description' => t('Contact module form element.'), + 'weight' => 5, + ); + return $extra; + } } diff --git a/modules/locale/locale.module b/modules/locale/locale.module index 9bd39fb..f2ca381 100644 --- a/modules/locale/locale.module +++ b/modules/locale/locale.module @@ -323,13 +323,14 @@ function locale_form_path_admin_form_alter(&$form, &$form_state) { * Implements hook_field_extra_fields(). */ function locale_field_extra_fields() { - $extra['user']['user']['form']['locale'] = array( - 'label' => t('Language settings'), - 'description' => t('Locale module form element.'), - 'weight' => 1, - ); - - return $extra; + if (variable_get('drupal_enable_core_extra_fields')) { + $extra['user']['user']['form']['locale'] = array( + 'label' => t('Language settings'), + 'description' => t('Locale module form element.'), + 'weight' => 1, + ); + return $extra; + } } /** diff --git a/modules/overlay/overlay.module b/modules/overlay/overlay.module index cf24d8c..0c57b37 100644 --- a/modules/overlay/overlay.module +++ b/modules/overlay/overlay.module @@ -120,13 +120,14 @@ function overlay_form_user_profile_form_alter(&$form, &$form_state) { * Implements hook_field_extra_fields(). */ function overlay_field_extra_fields() { - $extra['user']['user']['form']['overlay_control'] = array( - 'label' => t('Administrative overlay'), - 'description' => t('Overlay module form element.'), - 'weight' => 4, - ); - - return $extra; + if (variable_get('drupal_enable_core_extra_fields')) { + $extra['user']['user']['form']['overlay_control'] = array( + 'label' => t('Administrative overlay'), + 'description' => t('Overlay module form element.'), + 'weight' => 4, + ); + return $extra; + } } /** diff --git a/modules/user/user.module b/modules/user/user.module index 00601b1..fbac127 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -212,49 +212,51 @@ function user_field_info_alter(&$info) { * Implements hook_field_extra_fields(). */ function user_field_extra_fields() { - $extra['user']['user'] = array( - 'form' => array( - 'account' => array( - 'label' => t('User name and password'), - 'description' => t('User module account form elements.'), - 'weight' => -10, - ), - 'timezone' => array( - 'label' => t('Timezone'), - 'description' => t('User module timezone form element.'), - 'weight' => 6, - ), - ), - 'display' => array( - 'summary' => array( - 'label' => t('History'), - 'description' => t('User module history view element.'), - 'weight' => 5, + if (variable_get('drupal_enable_core_extra_fields')) { + $extra['user']['user'] = array( + 'form' => array( + 'account' => array( + 'label' => t('User name and password'), + 'description' => t('User module account form elements.'), + 'weight' => -10, + ), + 'timezone' => array( + 'label' => t('Timezone'), + 'description' => t('User module timezone form element.'), + 'weight' => 6, + ), ), - ), - ); - - if (variable_get('user_pictures', 0)) { - $extra['user']['user']['form'] += array( - 'picture' => array( - 'label' => t('User picture'), - 'description' => t('User module picture form element.'), - 'weight' => 1, + 'display' => array( + 'summary' => array( + 'label' => t('History'), + 'description' => t('User module history view element.'), + 'weight' => 5, + ), ), ); - } - if (variable_get('user_signatures', 0)) { - $extra['user']['user']['form'] += array( - 'signature_settings' => array( - 'label' => t('Signature settings'), - 'description' => t('User module form element.'), - 'weight' => 1, - ), - ); - } + if (variable_get('user_pictures', 0)) { + $extra['user']['user']['form'] += array( + 'picture' => array( + 'label' => t('User picture'), + 'description' => t('User module picture form element.'), + 'weight' => 1, + ), + ); + } - return $extra; + if (variable_get('user_signatures', 0)) { + $extra['user']['user']['form'] += array( + 'signature_settings' => array( + 'label' => t('Signature settings'), + 'description' => t('User module form element.'), + 'weight' => 1, + ), + ); + } + + return $extra; + } } /**