Created
July 11, 2012 07:13
-
-
Save zhangtaihao/3088645 to your computer and use it in GitHub Desktop.
Remove content_taxonomy_allowed_values()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module_load_include('inc', 'field', 'field.crud'); | |
$fields = field_read_fields(array('type' => 'taxonomy_term_reference')); | |
foreach ($fields as $field) { | |
if (isset($field['settings']['options_list_callback']) && $field['settings']['options_list_callback'] == 'content_taxonomy_allowed_values') { | |
$field['settings']['options_list_callback'] = 'taxonomy_allowed_values'; | |
field_update_field($field); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment