Forked from nkgokul/for_all_content_types_in_drupal.sh
Created
June 20, 2016 07:48
-
-
Save visabhishek/239d17e5b37ddef4f1ce4ae2a4d42e2d to your computer and use it in GitHub Desktop.
For all content types in drupal
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
#!/bin/bash | |
drush sqlq "select type from node_type" | while read content_type; | |
do | |
echo "Changing comment settings for $content_type" | |
drush vset comment_default_mode_$content_type 0 | |
drush vset comment_default_per_page_$content_type 50 | |
drush vset comment_$content_type 2 | |
drush vset comment_form_location_$content_type 1 | |
drush vset comment_preview_$content_type 0 | |
drush vset comment_subject_field_$content_type 0 | |
# or do whatever with individual element of the array | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment