function field_sync_field_status
field_sync_field_status()
Refreshes the 'active' and 'storage_active' columns for fields.
Related topics
File
- modules/field/field.module, line 427
- Attach custom data fields to Drupal entities.
Code
function field_sync_field_status() { // Refresh the 'active' and 'storage_active' columns according to the current // set of enabled modules. $modules = module_list(); foreach ($modules as $module_name) { field_associate_fields($module_name); } db_update('field_config') ->fields(array('active' => 0)) ->condition('module', $modules, 'NOT IN') ->execute(); db_update('field_config') ->fields(array('storage_active' => 0)) ->condition('storage_module', $modules, 'NOT IN') ->execute(); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!field!field.module/function/field_sync_field_status/7.x