Created
September 25, 2015 17:16
-
-
Save Josh-Miller/770d11e336bc48b2b052 to your computer and use it in GitHub Desktop.
Sets a view mode to be enabled in code.
This file contains 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
<?php | |
/** | |
* Run this in hook_update, enable, or install | |
**/ | |
$settings = field_bundle_settings('node', 'article'); | |
$settings['view_modes']['view_mode_name']['custom_settings'] = TRUE; | |
field_bundle_settings('node', 'article', $settings); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment